@fluidgrids/fe-sdk 0.0.0-stage → 2026.1203.7

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 (323) hide show
  1. package/README.md +564 -2
  2. package/dist/ActivityOptionsFields-C2u-hY2U.js +142 -0
  3. package/dist/AiStudioPage-B_hNTj-_.js +1137 -0
  4. package/dist/ApprovalInboxPage-ClITra3n.js +1312 -0
  5. package/dist/ChoiceSelect-LkK-uS9J.js +65 -0
  6. package/dist/ConfirmActionDialog-DHWTDRbp.js +31 -0
  7. package/dist/ConnectionFormDialog-C0kDgcrZ.js +153 -0
  8. package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
  9. package/dist/DataSinkDashboardPage-b4ezeqa6.js +278 -0
  10. package/dist/DataTablesPage-C1d9YGHz.js +5575 -0
  11. package/dist/DateTimeField-B1qR4ruo.js +51 -0
  12. package/dist/Disclosure-BNKij7-v.js +45 -0
  13. package/dist/ElementLibraryPage-8jNO6YmE.js +2256 -0
  14. package/dist/ElementLibrarySequenceDocument-B-W8SPzn.js +3979 -0
  15. package/dist/EnsureThemeProvider-BvlNjAd0.js +24 -0
  16. package/dist/EntityTagBadge-1OlP6p0c.js +25 -0
  17. package/dist/EntityTagPicker-BBrU5cE0.js +137 -0
  18. package/dist/ExecuteStepDocument-B4j1mdRT.js +189 -0
  19. package/dist/ExecutionDetailDocument-D6QuM-kp.js +875 -0
  20. package/dist/ExecutionDetailPage-D4CBtFdo.js +12217 -0
  21. package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
  22. package/dist/ExecutionStatusBadge-BsDVor9t.js +221 -0
  23. package/dist/ExecutionsListDocument-Dan7ZiqB.js +459 -0
  24. package/dist/ExecutionsListPage-B3XT8ITL.js +4307 -0
  25. package/dist/FailureTriagePanel-DOJMaJ0n.js +1285 -0
  26. package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
  27. package/dist/FluidGridsDocsLink-bX0Hnhxr.js +66 -0
  28. package/dist/FluidGridsMark-CE2blT7K.js +74 -0
  29. package/dist/HeldLoadRegion-BtTxbvOW.js +34 -0
  30. package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
  31. package/dist/HistoryPage-BSBISXoj.js +2835 -0
  32. package/dist/Icon-BtQ0HXLh.js +160 -0
  33. package/dist/InsightsPage-D7ybj8N9.js +11245 -0
  34. package/dist/IsolationSetting-vy911E8b.js +1153 -0
  35. package/dist/LibraryParts-DOeNgR8A.js +413 -0
  36. package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
  37. package/dist/ManagedAiPolicyAuthority-DM3t3wNr.d.ts +18 -0
  38. package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
  39. package/dist/McpTriggerServers-BCPCAOWB.js +459 -0
  40. package/dist/MissingNodesInstallModal-rO_SEDrC.js +224 -0
  41. package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
  42. package/dist/NodeSchemaIntrospectionDocument-C1vAIcHd.js +95 -0
  43. package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
  44. package/dist/NodesPage-O7KeeKtd.js +653 -0
  45. package/dist/OfflineIcon-TwMKYWjA.js +207 -0
  46. package/dist/OpenTemplateAsCodeButton-BhWJWIF3.js +94 -0
  47. package/dist/PaidTemplateConfirm-_G3ag6S4.js +28 -0
  48. package/dist/PublishCustomNodeAction-CIySbK4c.js +134 -0
  49. package/dist/RecordTaskDialog-BkpCDvhR.js +2078 -0
  50. package/dist/RunActionsMenu-DodOgIQm.js +59 -0
  51. package/dist/RunnerStatusPill-C1v967iq.js +24 -0
  52. package/dist/RunnersPage-dB0RSdY_.js +1929 -0
  53. package/dist/SandboxRuntimeExhaustedNotice-BFOIF93C.js +120 -0
  54. package/dist/SchedulesPage-DPWr1yvf.js +1607 -0
  55. package/dist/SearchBox-BGtYjvfs.js +49 -0
  56. package/dist/SequenceEditor-CFiHeHkR.js +497 -0
  57. package/dist/SettingsPage-0CQBNPZV.js +8695 -0
  58. package/dist/StewardPages-DAJhepen.js +47 -0
  59. package/dist/StewardRunImportPanel-Kva2DO0u.js +2844 -0
  60. package/dist/StoreTemplateCardCompact-CHn5kP7A.js +2166 -0
  61. package/dist/TagFilterSelect-CyA8QrS7.js +42 -0
  62. package/dist/TaskQueuesPage-DdnDCyat.js +3571 -0
  63. package/dist/TechnicalDetails-B0Oi4aZw.js +19 -0
  64. package/dist/TemplateConfigurationModal-CdvCYJLM.js +332 -0
  65. package/dist/TemplateDetailPanel-CbiKciuB.js +222 -0
  66. package/dist/TemplatePreview-cx7-NOeG.js +868 -0
  67. package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
  68. package/dist/TemplatesPage-BVQpGYIV.js +3251 -0
  69. package/dist/TerminateExecutionDocument-B_HKNVrN.js +581 -0
  70. package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
  71. package/dist/TranslationBridge-Da-TPgQm.js +68 -0
  72. package/dist/TriggerWorkflowDocument-D9Km2Vv2.js +460 -0
  73. package/dist/UiSequencePickerSequenceDocument-BSYnSDV7.js +607 -0
  74. package/dist/UiStepScreenshot-Qh4QMyUp.js +146 -0
  75. package/dist/UsageTimeSeriesDocument-DcInx9-z.js +177 -0
  76. package/dist/VariablesPage-ChfGuW22.js +2243 -0
  77. package/dist/VersionDiffDialog-Bd2AeUwf.js +1702 -0
  78. package/dist/VersionLifecycleBar-BBeWVtz-.js +143 -0
  79. package/dist/WebhookDeliveriesPage-D66bua0j.js +1563 -0
  80. package/dist/WorkflowBuilder-B6wQD1TK.js +539 -0
  81. package/dist/WorkflowBuilder-DR4ku8Tr.js +1611 -0
  82. package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
  83. package/dist/WorkflowEmbed-BXfFGy0i.js +708 -0
  84. package/dist/WorkflowEmbed-Cbqe1s1z.d.ts +6 -0
  85. package/dist/WorkflowPinnedDataDocument-BODT5omd.js +782 -0
  86. package/dist/WorkflowProposalCard-BruukdeF.js +96 -0
  87. package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
  88. package/dist/WorkflowSearchRedirect-C7zJ2MKH.js +40 -0
  89. package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
  90. package/dist/WorkflowSettingsDrawer-gazs97WR.js +196 -0
  91. package/dist/WorkflowShareDialog-e8jJtLjU.js +469 -0
  92. package/dist/WorkflowVersionsDocument-DRVOp8Uj.js +3213 -0
  93. package/dist/WorkflowsList--hR2_8gf.js +4593 -0
  94. package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
  95. package/dist/WorkflowsListPageDocument-CnzcQm_o.js +934 -0
  96. package/dist/addonCatalog-CbZS4deh.js +58 -0
  97. package/dist/addonCatalog-sjlonAmR.d.ts +15 -0
  98. package/dist/addons.d.ts +3 -0
  99. package/dist/addons.js +4 -0
  100. package/dist/agent-form-Bfvm32j1.js +83 -0
  101. package/dist/agent-tools.d.ts +3 -0
  102. package/dist/agent-tools.js +5 -0
  103. package/dist/agentTools-CyL7DLOF.js +320 -0
  104. package/dist/ai-usage-BrxDgvdR.js +240 -0
  105. package/dist/aiCreditsBridge-BuE92tKo.js +49 -0
  106. package/dist/api-BKq-nIOZ.js +2286 -0
  107. package/dist/api-Ol7I8NxE.js +8289 -0
  108. package/dist/apollo-type-policies.d.ts +11 -0
  109. package/dist/apollo-type-policies.js +64 -0
  110. package/dist/askAboutBridge-ByYsQams.js +106 -0
  111. package/dist/askQuestions-Cmx7VnMm.js +742 -0
  112. package/dist/assert-rules-lfYEMc99.js +318 -0
  113. package/dist/assistant.d.ts +94 -0
  114. package/dist/assistant.js +99 -0
  115. package/dist/attach-node-helpers-HDKQOtrD.js +32 -0
  116. package/dist/badge-CXfPhoMH.js +26 -0
  117. package/dist/basil.generated-BK-EHbwN.js +10 -0
  118. package/dist/browser-steps-DMpS5TyB.js +533 -0
  119. package/dist/builderTimings-pvGnK1m-.js +510 -0
  120. package/dist/button-DG7y_FVJ.js +48 -0
  121. package/dist/canvasNoteTools-BxuP_AYO.js +137 -0
  122. package/dist/card-Bomy_1UG.js +44 -0
  123. package/dist/catalogGrid-BOrfMgi-.js +41 -0
  124. package/dist/channel-CPyQ1NR1.js +212 -0
  125. package/dist/chips-CvNrYJZa.js +27 -0
  126. package/dist/client-holder-C0M5Cfwl.js +68 -0
  127. package/dist/cn-QqidFIgr.js +10 -0
  128. package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
  129. package/dist/code-editor-field-x_JrY8KR.js +113 -0
  130. package/dist/codec-client-DPuD6mw7.js +515 -0
  131. package/dist/conditionBuilder-DwfEF0Q-.js +1144 -0
  132. package/dist/config-DO68jw5k.js +322 -0
  133. package/dist/constants-DgbVc24O.d.ts +296 -0
  134. package/dist/constants-DlRnHBfQ.js +217 -0
  135. package/dist/convert-browser-action-pfecelF7.js +347 -0
  136. package/dist/convert-dialog-B_o22NiJ.js +382 -0
  137. package/dist/create-workflow-first-Azg3JUdX.js +120 -0
  138. package/dist/definition-canvas-Bsda-rDT.js +31 -0
  139. package/dist/dialog-BVd152GS.js +94 -0
  140. package/dist/durable-nodes-BXyYCLxT.js +91 -0
  141. package/dist/duration-CDb7-mT_.js +33 -0
  142. package/dist/edge-mapper-wEAdGVU2.js +4477 -0
  143. package/dist/element-library-DkSlg_VE.js +727 -0
  144. package/dist/entities-I_0kio3q.js +38 -0
  145. package/dist/error-advice-QLr5NCm7.js +65 -0
  146. package/dist/errors-ClKb5sEt.js +188 -0
  147. package/dist/executions.d.ts +3 -0
  148. package/dist/executions.js +5 -0
  149. package/dist/feature-flags-B2qetXKd.js +385 -0
  150. package/dist/field-label-DPZRmE_B.js +153 -0
  151. package/dist/firstWorkflow-C_h0KMB2.js +133 -0
  152. package/dist/flags.d.ts +3 -0
  153. package/dist/flags.js +4 -0
  154. package/dist/flow-builder-DIvLOhz0.js +28038 -0
  155. package/dist/flow-store-holder-CUN7Terz.js +52 -0
  156. package/dist/fluent.generated-CA_e6-4l.js +14 -0
  157. package/dist/fluidgridsEvents-bbEQbwU6.js +175 -0
  158. package/dist/fluidgridsTheme-DUhvOgoy.js +297 -0
  159. package/dist/global-client-BQPuFrFa.js +433 -0
  160. package/dist/global-operations-BG6YgxrM.js +136 -0
  161. package/dist/graphql-types-UTYtujY9.js +21358 -0
  162. package/dist/history.d.ts +3 -0
  163. package/dist/history.js +4 -0
  164. package/dist/index-AoJAa5vU.d.ts +164958 -0
  165. package/dist/index-DEMT3iAM.d.ts +120 -0
  166. package/dist/index-ROZzNGyY.d.ts +76 -0
  167. package/dist/index.d.ts +20 -0
  168. package/dist/index.js +8123 -0
  169. package/dist/ion.generated-mbajjcAg.js +10 -0
  170. package/dist/label-Lzb8ZXf_.js +29 -0
  171. package/dist/labels-rXd9gYQz.js +1236 -0
  172. package/dist/liveCanvas-D5ytXDp8.js +103 -0
  173. package/dist/logos.generated-X6_0kjVR.js +21 -0
  174. package/dist/logs-panel-Cw0DkG0l.js +468 -0
  175. package/dist/lucide.generated-B6NVd3GT.js +29 -0
  176. package/dist/marksStore-a9oIMMot.js +175 -0
  177. package/dist/mcp-trigger-D0nRdvq5.js +307 -0
  178. package/dist/mdi.generated-D1BV74d6.js +292 -0
  179. package/dist/menus-CU3hDGYl.js +160 -0
  180. package/dist/mynaui.generated-DMWr5cXz.js +66 -0
  181. package/dist/navigation-v2.d.ts +3 -0
  182. package/dist/navigation-v2.js +5 -0
  183. package/dist/node-detail-view-Cgm5H1P-.js +1372 -0
  184. package/dist/node-editor-tab-body-CZ0fVuVP.js +187 -0
  185. package/dist/node-operation-selection-CdV3KI_V.js +3534 -0
  186. package/dist/node-registry-refresh-s3okf83X.js +27 -0
  187. package/dist/node-role-TMbnkmeP.js +132 -0
  188. package/dist/node-type-icon-BZa8n4iG.js +33 -0
  189. package/dist/nodes.d.ts +3 -0
  190. package/dist/nodes.js +4 -0
  191. package/dist/notesKey-5EaREBGA.js +12 -0
  192. package/dist/observability.d.ts +3 -0
  193. package/dist/observability.js +5 -0
  194. package/dist/offset-pages-zghoClB3.js +55 -0
  195. package/dist/operations-BBmT9ToP.js +663 -0
  196. package/dist/operations-WxRJWeqO.js +3133 -0
  197. package/dist/output-files-Ba8bu5lv.js +196 -0
  198. package/dist/page-operation-DrWuhd6Y.js +129 -0
  199. package/dist/page-twins.d.ts +13 -0
  200. package/dist/page-twins.js +186 -0
  201. package/dist/pageControlSpecs-DZJ9K37m.js +134 -0
  202. package/dist/pageControlsBridge-0pX9s-3k.js +54 -0
  203. package/dist/pageControlsBridge-DAuT3w7L.d.ts +36 -0
  204. package/dist/panels-PfBBAToE.js +346 -0
  205. package/dist/parts-B7fBcw-B.js +346 -0
  206. package/dist/popover-Dms9Vz3j.js +3389 -0
  207. package/dist/preloadable-lazy-Pp47mqQ9.js +65 -0
  208. package/dist/proactive.d.ts +66 -0
  209. package/dist/proactive.js +237 -0
  210. package/dist/quick-config-panel-DFd77xho.js +451 -0
  211. package/dist/quota-DeA_CJ2e.js +175 -0
  212. package/dist/quota.d.ts +3 -0
  213. package/dist/quota.js +4 -0
  214. package/dist/read-only-context-Dt9N9SIG.js +18 -0
  215. package/dist/relative-time-Dxt8ZIIu.js +55 -0
  216. package/dist/results-CwK_yDxK.js +325 -0
  217. package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
  218. package/dist/route-data.d.ts +12 -0
  219. package/dist/route-data.js +69 -0
  220. package/dist/route-match-C-0_EnAt.d.ts +5 -0
  221. package/dist/route-match-DMkUICYV.js +41 -0
  222. package/dist/route-preload-C4DlGoCd.js +120 -0
  223. package/dist/run-display-UjLAoYqQ.js +81 -0
  224. package/dist/run-history-arGiHzGU.js +285 -0
  225. package/dist/run-list-links-DJn4Mf1T.js +98 -0
  226. package/dist/run-mode-USmM0-Uo.js +82 -0
  227. package/dist/run-parity-CWXqEJqM.js +144 -0
  228. package/dist/runsQuota-B6SyTbne.js +100 -0
  229. package/dist/runsQuota-DsniKiSg.d.ts +20 -0
  230. package/dist/safe-expression-Cw7-SCsm.js +1251 -0
  231. package/dist/save-status-store-C7nEYpfb.js +631 -0
  232. package/dist/schedule-panel-B4GYXzXQ.js +13774 -0
  233. package/dist/schedule-rules-ggVKRkBH.js +358 -0
  234. package/dist/secrets-Re_wSiE3.js +153 -0
  235. package/dist/settings.d.ts +4 -0
  236. package/dist/settings.js +6 -0
  237. package/dist/shared-DAWGGMSM.js +177 -0
  238. package/dist/sidebar-node-editor-6eSSgCzc.js +178 -0
  239. package/dist/solar.generated-CGYuUQAC.js +10 -0
  240. package/dist/stableTabbedDialog-BBhrfXGe.js +20 -0
  241. package/dist/start-url-CT6Yz96K.js +24 -0
  242. package/dist/status-CessxGpm.js +55 -0
  243. package/dist/store-icon-OctYp5zP.js +155 -0
  244. package/dist/styles-WGmTnZ2n.js +26 -0
  245. package/dist/styles.css +139 -0
  246. package/dist/svg-spinners.generated-CIPT7IhM.js +10 -0
  247. package/dist/template-code-CzN6JWNV.js +191 -0
  248. package/dist/template-graph-DLF9dygU.js +20 -0
  249. package/dist/template-preview-DcIIKOOL.js +32 -0
  250. package/dist/template-price-CdUHZRMF.js +40 -0
  251. package/dist/templates.d.ts +3 -0
  252. package/dist/templates.js +5 -0
  253. package/dist/theme-provider-CntfC4_i.js +23 -0
  254. package/dist/transient-DgZfhDfN.js +57 -0
  255. package/dist/typed-calls-C5tO03wq.js +26 -0
  256. package/dist/ui-script-By74Guk3.js +1094 -0
  257. package/dist/ui-script-editor-CqPu2bCN.js +2447 -0
  258. package/dist/ui-step-fix-8uM2_Hft.js +67 -0
  259. package/dist/ui-step-fix-store-CcO1FdRx.js +19 -0
  260. package/dist/ui-step-run-context-o7bLE6KP.js +46 -0
  261. package/dist/ui-target-editor-D2JhB_lD.js +673 -0
  262. package/dist/uiMarkTools-CSznnO1i.js +1054 -0
  263. package/dist/upgradePrompt-BAFBKKW5.js +72 -0
  264. package/dist/use-bare-node-registry-O6mKJO_n.js +11498 -0
  265. package/dist/use-browser-available-hj8wc3Kb.js +241 -0
  266. package/dist/use-edge-mapper-schemas-Bonofxow.js +496 -0
  267. package/dist/use-extension-bridge-B9ZreOkQ.js +608 -0
  268. package/dist/use-mobile-BTqCUjzS.js +27 -0
  269. package/dist/use-sdk-query-C697xZVv.js +116 -0
  270. package/dist/use-workflow-code-editor-CFoRFrZ5.js +753 -0
  271. package/dist/useActionParam-B2tU2BlY.js +85 -0
  272. package/dist/useAgentTokenStream-Bko_J0d0.js +4217 -0
  273. package/dist/useBrowserClients-3v95-gSh.js +103 -0
  274. package/dist/useCodeWorkflowInsights-w0tz9Ap_.js +600 -0
  275. package/dist/useConnections-DsgEJs05.js +439 -0
  276. package/dist/useDebouncedValue-BFekcv6n.js +18 -0
  277. package/dist/useDurableParity-8fnMZmBc.js +1787 -0
  278. package/dist/useEntityTags-D0spL6Ut.js +460 -0
  279. package/dist/useExecutions-2u5nGJJk.js +681 -0
  280. package/dist/useFluidGridsAnalytics-VM8lAi2x.js +238 -0
  281. package/dist/useGlobalStoreClient-BTdhkA2I.js +24 -0
  282. package/dist/useHumanRequests-zlYDp3l1.js +221 -0
  283. package/dist/useNavigationV2-C2WeqN7d.js +29 -0
  284. package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
  285. package/dist/useObservability-BRlQ0tOA.js +285 -0
  286. package/dist/useRequestedProposal-B7uPXfZB.js +51 -0
  287. package/dist/useRunHistory-CXCMUPyf.js +2759 -0
  288. package/dist/useRunLive-D0JvVZT2.js +1060 -0
  289. package/dist/useRunnerList-Dbi59i1K.js +446 -0
  290. package/dist/useRunners-URUc5quU.js +173 -0
  291. package/dist/useRunsPage-DG656UCK.js +2709 -0
  292. package/dist/useVariables-BIelxcWr.js +463 -0
  293. package/dist/useVersionHistoryData-CTjqVw7l.js +292 -0
  294. package/dist/useWorkflowCodeExport-pqxyLHD1.js +522 -0
  295. package/dist/useWorkflowListExport-hcZNvTaB.js +232 -0
  296. package/dist/useWorkflowOrganization-CpBbOrs7.js +1772 -0
  297. package/dist/useWorkflowProposal-BH0VdNMA.js +3280 -0
  298. package/dist/useWorkflows-Cvg-Z_IE.js +1606 -0
  299. package/dist/utils-fvBb5qOD.js +89 -0
  300. package/dist/webhook-deliveries-AvQujaZy.js +99 -0
  301. package/dist/workflow-builder-CJygVkVv.d.ts +2 -0
  302. package/dist/workflow-builder.d.ts +3 -0
  303. package/dist/workflow-builder.js +8 -0
  304. package/dist/workflow-code-transfer-Bsy0JKAZ.js +323 -0
  305. package/dist/workflow-embed.d.ts +3 -0
  306. package/dist/workflow-embed.js +4 -0
  307. package/dist/workflow-git-sync--K9ZsPDC.js +263 -0
  308. package/dist/workflow-host.d.ts +6 -0
  309. package/dist/workflow-host.js +11 -0
  310. package/dist/workflow-pages-D-7ByLTB.d.ts +68 -0
  311. package/dist/workflow-pages.d.ts +3 -0
  312. package/dist/workflow-pages.js +115 -0
  313. package/dist/workflow-preview-canvas-CO8yzdE3.js +848 -0
  314. package/dist/workflow-preview.d.ts +65 -0
  315. package/dist/workflow-preview.js +4 -0
  316. package/dist/workflow-route.d.ts +33 -0
  317. package/dist/workflow-route.js +4 -0
  318. package/dist/workflow-save-state-D0l-DkLf.js +767 -0
  319. package/dist/workflow-transfer-CQnQC-ke.js +104 -0
  320. package/dist/workflowRouteData-BkfVOc-O.js +169 -0
  321. package/dist/workflows-list.d.ts +10 -0
  322. package/dist/workflows-list.js +5 -0
  323. package/package.json +320 -4
@@ -0,0 +1,4217 @@
1
+ "use client";
2
+ import { r as isForbiddenError, s as throwIfResultError } from "./errors-ClKb5sEt.js";
3
+ import { n as getFluidGridsClient, r as getFluidGridsClientSafe } from "./client-holder-C0M5Cfwl.js";
4
+ import { HU as WorkflowTestExpectedStatus, UU as WorkflowTestRunSource, WU as WorkflowTestRunStatus, kh as ErrorType } from "./graphql-types-UTYtujY9.js";
5
+ import { a as operatorSpec, i as normaliseAssertRules, n as describeAssertRuleProblem } from "./assert-rules-lfYEMc99.js";
6
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
7
+
8
+ // src/generated/documents/wspace/AgentTokenDeltaDocument.ts
9
+ const AgentTokenDeltaDocument = {
10
+ "kind": "Document",
11
+ "definitions": [{
12
+ "kind": "OperationDefinition",
13
+ "operation": "subscription",
14
+ "name": {
15
+ "kind": "Name",
16
+ "value": "AgentTokenDelta"
17
+ },
18
+ "variableDefinitions": [{
19
+ "kind": "VariableDefinition",
20
+ "variable": {
21
+ "kind": "Variable",
22
+ "name": {
23
+ "kind": "Name",
24
+ "value": "runId"
25
+ }
26
+ },
27
+ "type": {
28
+ "kind": "NonNullType",
29
+ "type": {
30
+ "kind": "NamedType",
31
+ "name": {
32
+ "kind": "Name",
33
+ "value": "ID"
34
+ }
35
+ }
36
+ },
37
+ "directives": []
38
+ }],
39
+ "directives": [],
40
+ "selectionSet": {
41
+ "kind": "SelectionSet",
42
+ "selections": [{
43
+ "kind": "Field",
44
+ "name": {
45
+ "kind": "Name",
46
+ "value": "agentTokenDelta"
47
+ },
48
+ "arguments": [{
49
+ "kind": "Argument",
50
+ "name": {
51
+ "kind": "Name",
52
+ "value": "runId"
53
+ },
54
+ "value": {
55
+ "kind": "Variable",
56
+ "name": {
57
+ "kind": "Name",
58
+ "value": "runId"
59
+ }
60
+ }
61
+ }],
62
+ "directives": [],
63
+ "selectionSet": {
64
+ "kind": "SelectionSet",
65
+ "selections": [
66
+ {
67
+ "kind": "Field",
68
+ "name": {
69
+ "kind": "Name",
70
+ "value": "runId"
71
+ },
72
+ "arguments": [],
73
+ "directives": []
74
+ },
75
+ {
76
+ "kind": "Field",
77
+ "name": {
78
+ "kind": "Name",
79
+ "value": "nodeId"
80
+ },
81
+ "arguments": [],
82
+ "directives": []
83
+ },
84
+ {
85
+ "kind": "Field",
86
+ "name": {
87
+ "kind": "Name",
88
+ "value": "nodeStateId"
89
+ },
90
+ "arguments": [],
91
+ "directives": []
92
+ },
93
+ {
94
+ "kind": "Field",
95
+ "name": {
96
+ "kind": "Name",
97
+ "value": "iteration"
98
+ },
99
+ "arguments": [],
100
+ "directives": []
101
+ },
102
+ {
103
+ "kind": "Field",
104
+ "name": {
105
+ "kind": "Name",
106
+ "value": "offset"
107
+ },
108
+ "arguments": [],
109
+ "directives": []
110
+ },
111
+ {
112
+ "kind": "Field",
113
+ "name": {
114
+ "kind": "Name",
115
+ "value": "delta"
116
+ },
117
+ "arguments": [],
118
+ "directives": []
119
+ },
120
+ {
121
+ "kind": "Field",
122
+ "name": {
123
+ "kind": "Name",
124
+ "value": "reset"
125
+ },
126
+ "arguments": [],
127
+ "directives": []
128
+ },
129
+ {
130
+ "kind": "Field",
131
+ "name": {
132
+ "kind": "Name",
133
+ "value": "done"
134
+ },
135
+ "arguments": [],
136
+ "directives": []
137
+ },
138
+ {
139
+ "kind": "Field",
140
+ "name": {
141
+ "kind": "Name",
142
+ "value": "error"
143
+ },
144
+ "arguments": [],
145
+ "directives": []
146
+ }
147
+ ]
148
+ }
149
+ }]
150
+ }
151
+ }]
152
+ };
153
+
154
+ // src/generated/documents/wspace/CreateWorkflowTestCaseDocument.ts
155
+ const CreateWorkflowTestCaseDocument = {
156
+ "kind": "Document",
157
+ "definitions": [
158
+ {
159
+ "kind": "OperationDefinition",
160
+ "operation": "mutation",
161
+ "name": {
162
+ "kind": "Name",
163
+ "value": "CreateWorkflowTestCase"
164
+ },
165
+ "variableDefinitions": [{
166
+ "kind": "VariableDefinition",
167
+ "variable": {
168
+ "kind": "Variable",
169
+ "name": {
170
+ "kind": "Name",
171
+ "value": "workflowKey"
172
+ }
173
+ },
174
+ "type": {
175
+ "kind": "NonNullType",
176
+ "type": {
177
+ "kind": "NamedType",
178
+ "name": {
179
+ "kind": "Name",
180
+ "value": "String"
181
+ }
182
+ }
183
+ },
184
+ "directives": []
185
+ }, {
186
+ "kind": "VariableDefinition",
187
+ "variable": {
188
+ "kind": "Variable",
189
+ "name": {
190
+ "kind": "Name",
191
+ "value": "input"
192
+ }
193
+ },
194
+ "type": {
195
+ "kind": "NonNullType",
196
+ "type": {
197
+ "kind": "NamedType",
198
+ "name": {
199
+ "kind": "Name",
200
+ "value": "WorkflowTestCaseInput"
201
+ }
202
+ }
203
+ },
204
+ "directives": []
205
+ }],
206
+ "directives": [],
207
+ "selectionSet": {
208
+ "kind": "SelectionSet",
209
+ "selections": [{
210
+ "kind": "Field",
211
+ "name": {
212
+ "kind": "Name",
213
+ "value": "createWorkflowTestCase"
214
+ },
215
+ "arguments": [{
216
+ "kind": "Argument",
217
+ "name": {
218
+ "kind": "Name",
219
+ "value": "workflowKey"
220
+ },
221
+ "value": {
222
+ "kind": "Variable",
223
+ "name": {
224
+ "kind": "Name",
225
+ "value": "workflowKey"
226
+ }
227
+ }
228
+ }, {
229
+ "kind": "Argument",
230
+ "name": {
231
+ "kind": "Name",
232
+ "value": "input"
233
+ },
234
+ "value": {
235
+ "kind": "Variable",
236
+ "name": {
237
+ "kind": "Name",
238
+ "value": "input"
239
+ }
240
+ }
241
+ }],
242
+ "directives": [],
243
+ "selectionSet": {
244
+ "kind": "SelectionSet",
245
+ "selections": [{
246
+ "kind": "FragmentSpread",
247
+ "name": {
248
+ "kind": "Name",
249
+ "value": "WorkflowTestCaseFields"
250
+ },
251
+ "directives": []
252
+ }]
253
+ }
254
+ }]
255
+ }
256
+ },
257
+ {
258
+ "kind": "FragmentDefinition",
259
+ "name": {
260
+ "kind": "Name",
261
+ "value": "WorkflowTestCaseFields"
262
+ },
263
+ "variableDefinitions": [],
264
+ "typeCondition": {
265
+ "kind": "NamedType",
266
+ "name": {
267
+ "kind": "Name",
268
+ "value": "WorkflowTestCase"
269
+ }
270
+ },
271
+ "directives": [],
272
+ "selectionSet": {
273
+ "kind": "SelectionSet",
274
+ "selections": [
275
+ {
276
+ "kind": "Field",
277
+ "name": {
278
+ "kind": "Name",
279
+ "value": "id"
280
+ },
281
+ "arguments": [],
282
+ "directives": []
283
+ },
284
+ {
285
+ "kind": "Field",
286
+ "name": {
287
+ "kind": "Name",
288
+ "value": "workflowKey"
289
+ },
290
+ "arguments": [],
291
+ "directives": []
292
+ },
293
+ {
294
+ "kind": "Field",
295
+ "name": {
296
+ "kind": "Name",
297
+ "value": "name"
298
+ },
299
+ "arguments": [],
300
+ "directives": []
301
+ },
302
+ {
303
+ "kind": "Field",
304
+ "name": {
305
+ "kind": "Name",
306
+ "value": "description"
307
+ },
308
+ "arguments": [],
309
+ "directives": []
310
+ },
311
+ {
312
+ "kind": "Field",
313
+ "name": {
314
+ "kind": "Name",
315
+ "value": "triggerNodeId"
316
+ },
317
+ "arguments": [],
318
+ "directives": []
319
+ },
320
+ {
321
+ "kind": "Field",
322
+ "name": {
323
+ "kind": "Name",
324
+ "value": "triggerData"
325
+ },
326
+ "arguments": [],
327
+ "directives": []
328
+ },
329
+ {
330
+ "kind": "Field",
331
+ "name": {
332
+ "kind": "Name",
333
+ "value": "pinnedOutputs"
334
+ },
335
+ "arguments": [],
336
+ "directives": []
337
+ },
338
+ {
339
+ "kind": "Field",
340
+ "name": {
341
+ "kind": "Name",
342
+ "value": "connectionMocks"
343
+ },
344
+ "arguments": [],
345
+ "directives": [],
346
+ "selectionSet": {
347
+ "kind": "SelectionSet",
348
+ "selections": [
349
+ {
350
+ "kind": "Field",
351
+ "name": {
352
+ "kind": "Name",
353
+ "value": "nodeId"
354
+ },
355
+ "arguments": [],
356
+ "directives": []
357
+ },
358
+ {
359
+ "kind": "Field",
360
+ "name": {
361
+ "kind": "Name",
362
+ "value": "operation"
363
+ },
364
+ "arguments": [],
365
+ "directives": []
366
+ },
367
+ {
368
+ "kind": "Field",
369
+ "name": {
370
+ "kind": "Name",
371
+ "value": "response"
372
+ },
373
+ "arguments": [],
374
+ "directives": []
375
+ },
376
+ {
377
+ "kind": "Field",
378
+ "name": {
379
+ "kind": "Name",
380
+ "value": "error"
381
+ },
382
+ "arguments": [],
383
+ "directives": [],
384
+ "selectionSet": {
385
+ "kind": "SelectionSet",
386
+ "selections": [{
387
+ "kind": "Field",
388
+ "name": {
389
+ "kind": "Name",
390
+ "value": "message"
391
+ },
392
+ "arguments": [],
393
+ "directives": []
394
+ }, {
395
+ "kind": "Field",
396
+ "name": {
397
+ "kind": "Name",
398
+ "value": "errorType"
399
+ },
400
+ "arguments": [],
401
+ "directives": []
402
+ }]
403
+ }
404
+ }
405
+ ]
406
+ }
407
+ },
408
+ {
409
+ "kind": "Field",
410
+ "name": {
411
+ "kind": "Name",
412
+ "value": "expectedStatus"
413
+ },
414
+ "arguments": [],
415
+ "directives": []
416
+ },
417
+ {
418
+ "kind": "Field",
419
+ "name": {
420
+ "kind": "Name",
421
+ "value": "expectations"
422
+ },
423
+ "arguments": [],
424
+ "directives": [],
425
+ "selectionSet": {
426
+ "kind": "SelectionSet",
427
+ "selections": [{
428
+ "kind": "Field",
429
+ "name": {
430
+ "kind": "Name",
431
+ "value": "nodeId"
432
+ },
433
+ "arguments": [],
434
+ "directives": []
435
+ }, {
436
+ "kind": "Field",
437
+ "name": {
438
+ "kind": "Name",
439
+ "value": "rules"
440
+ },
441
+ "arguments": [],
442
+ "directives": [],
443
+ "selectionSet": {
444
+ "kind": "SelectionSet",
445
+ "selections": [
446
+ {
447
+ "kind": "Field",
448
+ "name": {
449
+ "kind": "Name",
450
+ "value": "path"
451
+ },
452
+ "arguments": [],
453
+ "directives": []
454
+ },
455
+ {
456
+ "kind": "Field",
457
+ "name": {
458
+ "kind": "Name",
459
+ "value": "operator"
460
+ },
461
+ "arguments": [],
462
+ "directives": []
463
+ },
464
+ {
465
+ "kind": "Field",
466
+ "name": {
467
+ "kind": "Name",
468
+ "value": "expected"
469
+ },
470
+ "arguments": [],
471
+ "directives": []
472
+ },
473
+ {
474
+ "kind": "Field",
475
+ "name": {
476
+ "kind": "Name",
477
+ "value": "min"
478
+ },
479
+ "arguments": [],
480
+ "directives": []
481
+ },
482
+ {
483
+ "kind": "Field",
484
+ "name": {
485
+ "kind": "Name",
486
+ "value": "max"
487
+ },
488
+ "arguments": [],
489
+ "directives": []
490
+ },
491
+ {
492
+ "kind": "Field",
493
+ "name": {
494
+ "kind": "Name",
495
+ "value": "message"
496
+ },
497
+ "arguments": [],
498
+ "directives": []
499
+ }
500
+ ]
501
+ }
502
+ }]
503
+ }
504
+ },
505
+ {
506
+ "kind": "Field",
507
+ "name": {
508
+ "kind": "Name",
509
+ "value": "enabled"
510
+ },
511
+ "arguments": [],
512
+ "directives": []
513
+ },
514
+ {
515
+ "kind": "Field",
516
+ "name": {
517
+ "kind": "Name",
518
+ "value": "sortOrder"
519
+ },
520
+ "arguments": [],
521
+ "directives": []
522
+ },
523
+ {
524
+ "kind": "Field",
525
+ "name": {
526
+ "kind": "Name",
527
+ "value": "createdBy"
528
+ },
529
+ "arguments": [],
530
+ "directives": []
531
+ },
532
+ {
533
+ "kind": "Field",
534
+ "name": {
535
+ "kind": "Name",
536
+ "value": "updatedBy"
537
+ },
538
+ "arguments": [],
539
+ "directives": []
540
+ },
541
+ {
542
+ "kind": "Field",
543
+ "name": {
544
+ "kind": "Name",
545
+ "value": "createdAt"
546
+ },
547
+ "arguments": [],
548
+ "directives": []
549
+ },
550
+ {
551
+ "kind": "Field",
552
+ "name": {
553
+ "kind": "Name",
554
+ "value": "updatedAt"
555
+ },
556
+ "arguments": [],
557
+ "directives": []
558
+ },
559
+ {
560
+ "kind": "Field",
561
+ "name": {
562
+ "kind": "Name",
563
+ "value": "lastResult"
564
+ },
565
+ "arguments": [],
566
+ "directives": [],
567
+ "selectionSet": {
568
+ "kind": "SelectionSet",
569
+ "selections": [{
570
+ "kind": "FragmentSpread",
571
+ "name": {
572
+ "kind": "Name",
573
+ "value": "WorkflowTestCaseResultFields"
574
+ },
575
+ "directives": []
576
+ }]
577
+ }
578
+ }
579
+ ]
580
+ }
581
+ },
582
+ {
583
+ "kind": "FragmentDefinition",
584
+ "name": {
585
+ "kind": "Name",
586
+ "value": "WorkflowTestCaseResultFields"
587
+ },
588
+ "variableDefinitions": [],
589
+ "typeCondition": {
590
+ "kind": "NamedType",
591
+ "name": {
592
+ "kind": "Name",
593
+ "value": "WorkflowTestCaseResult"
594
+ }
595
+ },
596
+ "directives": [],
597
+ "selectionSet": {
598
+ "kind": "SelectionSet",
599
+ "selections": [
600
+ {
601
+ "kind": "Field",
602
+ "name": {
603
+ "kind": "Name",
604
+ "value": "caseId"
605
+ },
606
+ "arguments": [],
607
+ "directives": []
608
+ },
609
+ {
610
+ "kind": "Field",
611
+ "name": {
612
+ "kind": "Name",
613
+ "value": "caseName"
614
+ },
615
+ "arguments": [],
616
+ "directives": []
617
+ },
618
+ {
619
+ "kind": "Field",
620
+ "name": {
621
+ "kind": "Name",
622
+ "value": "runId"
623
+ },
624
+ "arguments": [],
625
+ "directives": []
626
+ },
627
+ {
628
+ "kind": "Field",
629
+ "name": {
630
+ "kind": "Name",
631
+ "value": "status"
632
+ },
633
+ "arguments": [],
634
+ "directives": []
635
+ },
636
+ {
637
+ "kind": "Field",
638
+ "name": {
639
+ "kind": "Name",
640
+ "value": "runStatus"
641
+ },
642
+ "arguments": [],
643
+ "directives": []
644
+ },
645
+ {
646
+ "kind": "Field",
647
+ "name": {
648
+ "kind": "Name",
649
+ "value": "failures"
650
+ },
651
+ "arguments": [],
652
+ "directives": [],
653
+ "selectionSet": {
654
+ "kind": "SelectionSet",
655
+ "selections": [
656
+ {
657
+ "kind": "Field",
658
+ "name": {
659
+ "kind": "Name",
660
+ "value": "nodeId"
661
+ },
662
+ "arguments": [],
663
+ "directives": []
664
+ },
665
+ {
666
+ "kind": "Field",
667
+ "name": {
668
+ "kind": "Name",
669
+ "value": "code"
670
+ },
671
+ "arguments": [],
672
+ "directives": []
673
+ },
674
+ {
675
+ "kind": "Field",
676
+ "name": {
677
+ "kind": "Name",
678
+ "value": "message"
679
+ },
680
+ "arguments": [],
681
+ "directives": []
682
+ }
683
+ ]
684
+ }
685
+ },
686
+ {
687
+ "kind": "Field",
688
+ "name": {
689
+ "kind": "Name",
690
+ "value": "completedAt"
691
+ },
692
+ "arguments": [],
693
+ "directives": []
694
+ }
695
+ ]
696
+ }
697
+ }
698
+ ]
699
+ };
700
+
701
+ // src/generated/documents/wspace/UpdateWorkflowTestCaseDocument.ts
702
+ const UpdateWorkflowTestCaseDocument = {
703
+ "kind": "Document",
704
+ "definitions": [
705
+ {
706
+ "kind": "OperationDefinition",
707
+ "operation": "mutation",
708
+ "name": {
709
+ "kind": "Name",
710
+ "value": "UpdateWorkflowTestCase"
711
+ },
712
+ "variableDefinitions": [{
713
+ "kind": "VariableDefinition",
714
+ "variable": {
715
+ "kind": "Variable",
716
+ "name": {
717
+ "kind": "Name",
718
+ "value": "id"
719
+ }
720
+ },
721
+ "type": {
722
+ "kind": "NonNullType",
723
+ "type": {
724
+ "kind": "NamedType",
725
+ "name": {
726
+ "kind": "Name",
727
+ "value": "ID"
728
+ }
729
+ }
730
+ },
731
+ "directives": []
732
+ }, {
733
+ "kind": "VariableDefinition",
734
+ "variable": {
735
+ "kind": "Variable",
736
+ "name": {
737
+ "kind": "Name",
738
+ "value": "input"
739
+ }
740
+ },
741
+ "type": {
742
+ "kind": "NonNullType",
743
+ "type": {
744
+ "kind": "NamedType",
745
+ "name": {
746
+ "kind": "Name",
747
+ "value": "WorkflowTestCaseInput"
748
+ }
749
+ }
750
+ },
751
+ "directives": []
752
+ }],
753
+ "directives": [],
754
+ "selectionSet": {
755
+ "kind": "SelectionSet",
756
+ "selections": [{
757
+ "kind": "Field",
758
+ "name": {
759
+ "kind": "Name",
760
+ "value": "updateWorkflowTestCase"
761
+ },
762
+ "arguments": [{
763
+ "kind": "Argument",
764
+ "name": {
765
+ "kind": "Name",
766
+ "value": "id"
767
+ },
768
+ "value": {
769
+ "kind": "Variable",
770
+ "name": {
771
+ "kind": "Name",
772
+ "value": "id"
773
+ }
774
+ }
775
+ }, {
776
+ "kind": "Argument",
777
+ "name": {
778
+ "kind": "Name",
779
+ "value": "input"
780
+ },
781
+ "value": {
782
+ "kind": "Variable",
783
+ "name": {
784
+ "kind": "Name",
785
+ "value": "input"
786
+ }
787
+ }
788
+ }],
789
+ "directives": [],
790
+ "selectionSet": {
791
+ "kind": "SelectionSet",
792
+ "selections": [{
793
+ "kind": "FragmentSpread",
794
+ "name": {
795
+ "kind": "Name",
796
+ "value": "WorkflowTestCaseFields"
797
+ },
798
+ "directives": []
799
+ }]
800
+ }
801
+ }]
802
+ }
803
+ },
804
+ {
805
+ "kind": "FragmentDefinition",
806
+ "name": {
807
+ "kind": "Name",
808
+ "value": "WorkflowTestCaseFields"
809
+ },
810
+ "variableDefinitions": [],
811
+ "typeCondition": {
812
+ "kind": "NamedType",
813
+ "name": {
814
+ "kind": "Name",
815
+ "value": "WorkflowTestCase"
816
+ }
817
+ },
818
+ "directives": [],
819
+ "selectionSet": {
820
+ "kind": "SelectionSet",
821
+ "selections": [
822
+ {
823
+ "kind": "Field",
824
+ "name": {
825
+ "kind": "Name",
826
+ "value": "id"
827
+ },
828
+ "arguments": [],
829
+ "directives": []
830
+ },
831
+ {
832
+ "kind": "Field",
833
+ "name": {
834
+ "kind": "Name",
835
+ "value": "workflowKey"
836
+ },
837
+ "arguments": [],
838
+ "directives": []
839
+ },
840
+ {
841
+ "kind": "Field",
842
+ "name": {
843
+ "kind": "Name",
844
+ "value": "name"
845
+ },
846
+ "arguments": [],
847
+ "directives": []
848
+ },
849
+ {
850
+ "kind": "Field",
851
+ "name": {
852
+ "kind": "Name",
853
+ "value": "description"
854
+ },
855
+ "arguments": [],
856
+ "directives": []
857
+ },
858
+ {
859
+ "kind": "Field",
860
+ "name": {
861
+ "kind": "Name",
862
+ "value": "triggerNodeId"
863
+ },
864
+ "arguments": [],
865
+ "directives": []
866
+ },
867
+ {
868
+ "kind": "Field",
869
+ "name": {
870
+ "kind": "Name",
871
+ "value": "triggerData"
872
+ },
873
+ "arguments": [],
874
+ "directives": []
875
+ },
876
+ {
877
+ "kind": "Field",
878
+ "name": {
879
+ "kind": "Name",
880
+ "value": "pinnedOutputs"
881
+ },
882
+ "arguments": [],
883
+ "directives": []
884
+ },
885
+ {
886
+ "kind": "Field",
887
+ "name": {
888
+ "kind": "Name",
889
+ "value": "connectionMocks"
890
+ },
891
+ "arguments": [],
892
+ "directives": [],
893
+ "selectionSet": {
894
+ "kind": "SelectionSet",
895
+ "selections": [
896
+ {
897
+ "kind": "Field",
898
+ "name": {
899
+ "kind": "Name",
900
+ "value": "nodeId"
901
+ },
902
+ "arguments": [],
903
+ "directives": []
904
+ },
905
+ {
906
+ "kind": "Field",
907
+ "name": {
908
+ "kind": "Name",
909
+ "value": "operation"
910
+ },
911
+ "arguments": [],
912
+ "directives": []
913
+ },
914
+ {
915
+ "kind": "Field",
916
+ "name": {
917
+ "kind": "Name",
918
+ "value": "response"
919
+ },
920
+ "arguments": [],
921
+ "directives": []
922
+ },
923
+ {
924
+ "kind": "Field",
925
+ "name": {
926
+ "kind": "Name",
927
+ "value": "error"
928
+ },
929
+ "arguments": [],
930
+ "directives": [],
931
+ "selectionSet": {
932
+ "kind": "SelectionSet",
933
+ "selections": [{
934
+ "kind": "Field",
935
+ "name": {
936
+ "kind": "Name",
937
+ "value": "message"
938
+ },
939
+ "arguments": [],
940
+ "directives": []
941
+ }, {
942
+ "kind": "Field",
943
+ "name": {
944
+ "kind": "Name",
945
+ "value": "errorType"
946
+ },
947
+ "arguments": [],
948
+ "directives": []
949
+ }]
950
+ }
951
+ }
952
+ ]
953
+ }
954
+ },
955
+ {
956
+ "kind": "Field",
957
+ "name": {
958
+ "kind": "Name",
959
+ "value": "expectedStatus"
960
+ },
961
+ "arguments": [],
962
+ "directives": []
963
+ },
964
+ {
965
+ "kind": "Field",
966
+ "name": {
967
+ "kind": "Name",
968
+ "value": "expectations"
969
+ },
970
+ "arguments": [],
971
+ "directives": [],
972
+ "selectionSet": {
973
+ "kind": "SelectionSet",
974
+ "selections": [{
975
+ "kind": "Field",
976
+ "name": {
977
+ "kind": "Name",
978
+ "value": "nodeId"
979
+ },
980
+ "arguments": [],
981
+ "directives": []
982
+ }, {
983
+ "kind": "Field",
984
+ "name": {
985
+ "kind": "Name",
986
+ "value": "rules"
987
+ },
988
+ "arguments": [],
989
+ "directives": [],
990
+ "selectionSet": {
991
+ "kind": "SelectionSet",
992
+ "selections": [
993
+ {
994
+ "kind": "Field",
995
+ "name": {
996
+ "kind": "Name",
997
+ "value": "path"
998
+ },
999
+ "arguments": [],
1000
+ "directives": []
1001
+ },
1002
+ {
1003
+ "kind": "Field",
1004
+ "name": {
1005
+ "kind": "Name",
1006
+ "value": "operator"
1007
+ },
1008
+ "arguments": [],
1009
+ "directives": []
1010
+ },
1011
+ {
1012
+ "kind": "Field",
1013
+ "name": {
1014
+ "kind": "Name",
1015
+ "value": "expected"
1016
+ },
1017
+ "arguments": [],
1018
+ "directives": []
1019
+ },
1020
+ {
1021
+ "kind": "Field",
1022
+ "name": {
1023
+ "kind": "Name",
1024
+ "value": "min"
1025
+ },
1026
+ "arguments": [],
1027
+ "directives": []
1028
+ },
1029
+ {
1030
+ "kind": "Field",
1031
+ "name": {
1032
+ "kind": "Name",
1033
+ "value": "max"
1034
+ },
1035
+ "arguments": [],
1036
+ "directives": []
1037
+ },
1038
+ {
1039
+ "kind": "Field",
1040
+ "name": {
1041
+ "kind": "Name",
1042
+ "value": "message"
1043
+ },
1044
+ "arguments": [],
1045
+ "directives": []
1046
+ }
1047
+ ]
1048
+ }
1049
+ }]
1050
+ }
1051
+ },
1052
+ {
1053
+ "kind": "Field",
1054
+ "name": {
1055
+ "kind": "Name",
1056
+ "value": "enabled"
1057
+ },
1058
+ "arguments": [],
1059
+ "directives": []
1060
+ },
1061
+ {
1062
+ "kind": "Field",
1063
+ "name": {
1064
+ "kind": "Name",
1065
+ "value": "sortOrder"
1066
+ },
1067
+ "arguments": [],
1068
+ "directives": []
1069
+ },
1070
+ {
1071
+ "kind": "Field",
1072
+ "name": {
1073
+ "kind": "Name",
1074
+ "value": "createdBy"
1075
+ },
1076
+ "arguments": [],
1077
+ "directives": []
1078
+ },
1079
+ {
1080
+ "kind": "Field",
1081
+ "name": {
1082
+ "kind": "Name",
1083
+ "value": "updatedBy"
1084
+ },
1085
+ "arguments": [],
1086
+ "directives": []
1087
+ },
1088
+ {
1089
+ "kind": "Field",
1090
+ "name": {
1091
+ "kind": "Name",
1092
+ "value": "createdAt"
1093
+ },
1094
+ "arguments": [],
1095
+ "directives": []
1096
+ },
1097
+ {
1098
+ "kind": "Field",
1099
+ "name": {
1100
+ "kind": "Name",
1101
+ "value": "updatedAt"
1102
+ },
1103
+ "arguments": [],
1104
+ "directives": []
1105
+ },
1106
+ {
1107
+ "kind": "Field",
1108
+ "name": {
1109
+ "kind": "Name",
1110
+ "value": "lastResult"
1111
+ },
1112
+ "arguments": [],
1113
+ "directives": [],
1114
+ "selectionSet": {
1115
+ "kind": "SelectionSet",
1116
+ "selections": [{
1117
+ "kind": "FragmentSpread",
1118
+ "name": {
1119
+ "kind": "Name",
1120
+ "value": "WorkflowTestCaseResultFields"
1121
+ },
1122
+ "directives": []
1123
+ }]
1124
+ }
1125
+ }
1126
+ ]
1127
+ }
1128
+ },
1129
+ {
1130
+ "kind": "FragmentDefinition",
1131
+ "name": {
1132
+ "kind": "Name",
1133
+ "value": "WorkflowTestCaseResultFields"
1134
+ },
1135
+ "variableDefinitions": [],
1136
+ "typeCondition": {
1137
+ "kind": "NamedType",
1138
+ "name": {
1139
+ "kind": "Name",
1140
+ "value": "WorkflowTestCaseResult"
1141
+ }
1142
+ },
1143
+ "directives": [],
1144
+ "selectionSet": {
1145
+ "kind": "SelectionSet",
1146
+ "selections": [
1147
+ {
1148
+ "kind": "Field",
1149
+ "name": {
1150
+ "kind": "Name",
1151
+ "value": "caseId"
1152
+ },
1153
+ "arguments": [],
1154
+ "directives": []
1155
+ },
1156
+ {
1157
+ "kind": "Field",
1158
+ "name": {
1159
+ "kind": "Name",
1160
+ "value": "caseName"
1161
+ },
1162
+ "arguments": [],
1163
+ "directives": []
1164
+ },
1165
+ {
1166
+ "kind": "Field",
1167
+ "name": {
1168
+ "kind": "Name",
1169
+ "value": "runId"
1170
+ },
1171
+ "arguments": [],
1172
+ "directives": []
1173
+ },
1174
+ {
1175
+ "kind": "Field",
1176
+ "name": {
1177
+ "kind": "Name",
1178
+ "value": "status"
1179
+ },
1180
+ "arguments": [],
1181
+ "directives": []
1182
+ },
1183
+ {
1184
+ "kind": "Field",
1185
+ "name": {
1186
+ "kind": "Name",
1187
+ "value": "runStatus"
1188
+ },
1189
+ "arguments": [],
1190
+ "directives": []
1191
+ },
1192
+ {
1193
+ "kind": "Field",
1194
+ "name": {
1195
+ "kind": "Name",
1196
+ "value": "failures"
1197
+ },
1198
+ "arguments": [],
1199
+ "directives": [],
1200
+ "selectionSet": {
1201
+ "kind": "SelectionSet",
1202
+ "selections": [
1203
+ {
1204
+ "kind": "Field",
1205
+ "name": {
1206
+ "kind": "Name",
1207
+ "value": "nodeId"
1208
+ },
1209
+ "arguments": [],
1210
+ "directives": []
1211
+ },
1212
+ {
1213
+ "kind": "Field",
1214
+ "name": {
1215
+ "kind": "Name",
1216
+ "value": "code"
1217
+ },
1218
+ "arguments": [],
1219
+ "directives": []
1220
+ },
1221
+ {
1222
+ "kind": "Field",
1223
+ "name": {
1224
+ "kind": "Name",
1225
+ "value": "message"
1226
+ },
1227
+ "arguments": [],
1228
+ "directives": []
1229
+ }
1230
+ ]
1231
+ }
1232
+ },
1233
+ {
1234
+ "kind": "Field",
1235
+ "name": {
1236
+ "kind": "Name",
1237
+ "value": "completedAt"
1238
+ },
1239
+ "arguments": [],
1240
+ "directives": []
1241
+ }
1242
+ ]
1243
+ }
1244
+ }
1245
+ ]
1246
+ };
1247
+
1248
+ // src/generated/documents/wspace/DeleteWorkflowTestCaseDocument.ts
1249
+ const DeleteWorkflowTestCaseDocument = {
1250
+ "kind": "Document",
1251
+ "definitions": [{
1252
+ "kind": "OperationDefinition",
1253
+ "operation": "mutation",
1254
+ "name": {
1255
+ "kind": "Name",
1256
+ "value": "DeleteWorkflowTestCase"
1257
+ },
1258
+ "variableDefinitions": [{
1259
+ "kind": "VariableDefinition",
1260
+ "variable": {
1261
+ "kind": "Variable",
1262
+ "name": {
1263
+ "kind": "Name",
1264
+ "value": "id"
1265
+ }
1266
+ },
1267
+ "type": {
1268
+ "kind": "NonNullType",
1269
+ "type": {
1270
+ "kind": "NamedType",
1271
+ "name": {
1272
+ "kind": "Name",
1273
+ "value": "ID"
1274
+ }
1275
+ }
1276
+ },
1277
+ "directives": []
1278
+ }],
1279
+ "directives": [],
1280
+ "selectionSet": {
1281
+ "kind": "SelectionSet",
1282
+ "selections": [{
1283
+ "kind": "Field",
1284
+ "name": {
1285
+ "kind": "Name",
1286
+ "value": "deleteWorkflowTestCase"
1287
+ },
1288
+ "arguments": [{
1289
+ "kind": "Argument",
1290
+ "name": {
1291
+ "kind": "Name",
1292
+ "value": "id"
1293
+ },
1294
+ "value": {
1295
+ "kind": "Variable",
1296
+ "name": {
1297
+ "kind": "Name",
1298
+ "value": "id"
1299
+ }
1300
+ }
1301
+ }],
1302
+ "directives": []
1303
+ }]
1304
+ }
1305
+ }]
1306
+ };
1307
+
1308
+ // src/generated/documents/wspace/CreateWorkflowTestCaseFromRunDocument.ts
1309
+ const CreateWorkflowTestCaseFromRunDocument = {
1310
+ "kind": "Document",
1311
+ "definitions": [
1312
+ {
1313
+ "kind": "OperationDefinition",
1314
+ "operation": "mutation",
1315
+ "name": {
1316
+ "kind": "Name",
1317
+ "value": "CreateWorkflowTestCaseFromRun"
1318
+ },
1319
+ "variableDefinitions": [
1320
+ {
1321
+ "kind": "VariableDefinition",
1322
+ "variable": {
1323
+ "kind": "Variable",
1324
+ "name": {
1325
+ "kind": "Name",
1326
+ "value": "runId"
1327
+ }
1328
+ },
1329
+ "type": {
1330
+ "kind": "NonNullType",
1331
+ "type": {
1332
+ "kind": "NamedType",
1333
+ "name": {
1334
+ "kind": "Name",
1335
+ "value": "ID"
1336
+ }
1337
+ }
1338
+ },
1339
+ "directives": []
1340
+ },
1341
+ {
1342
+ "kind": "VariableDefinition",
1343
+ "variable": {
1344
+ "kind": "Variable",
1345
+ "name": {
1346
+ "kind": "Name",
1347
+ "value": "name"
1348
+ }
1349
+ },
1350
+ "type": {
1351
+ "kind": "NonNullType",
1352
+ "type": {
1353
+ "kind": "NamedType",
1354
+ "name": {
1355
+ "kind": "Name",
1356
+ "value": "String"
1357
+ }
1358
+ }
1359
+ },
1360
+ "directives": []
1361
+ },
1362
+ {
1363
+ "kind": "VariableDefinition",
1364
+ "variable": {
1365
+ "kind": "Variable",
1366
+ "name": {
1367
+ "kind": "Name",
1368
+ "value": "description"
1369
+ }
1370
+ },
1371
+ "type": {
1372
+ "kind": "NamedType",
1373
+ "name": {
1374
+ "kind": "Name",
1375
+ "value": "String"
1376
+ }
1377
+ },
1378
+ "directives": []
1379
+ }
1380
+ ],
1381
+ "directives": [],
1382
+ "selectionSet": {
1383
+ "kind": "SelectionSet",
1384
+ "selections": [{
1385
+ "kind": "Field",
1386
+ "name": {
1387
+ "kind": "Name",
1388
+ "value": "createWorkflowTestCaseFromRun"
1389
+ },
1390
+ "arguments": [
1391
+ {
1392
+ "kind": "Argument",
1393
+ "name": {
1394
+ "kind": "Name",
1395
+ "value": "runId"
1396
+ },
1397
+ "value": {
1398
+ "kind": "Variable",
1399
+ "name": {
1400
+ "kind": "Name",
1401
+ "value": "runId"
1402
+ }
1403
+ }
1404
+ },
1405
+ {
1406
+ "kind": "Argument",
1407
+ "name": {
1408
+ "kind": "Name",
1409
+ "value": "name"
1410
+ },
1411
+ "value": {
1412
+ "kind": "Variable",
1413
+ "name": {
1414
+ "kind": "Name",
1415
+ "value": "name"
1416
+ }
1417
+ }
1418
+ },
1419
+ {
1420
+ "kind": "Argument",
1421
+ "name": {
1422
+ "kind": "Name",
1423
+ "value": "description"
1424
+ },
1425
+ "value": {
1426
+ "kind": "Variable",
1427
+ "name": {
1428
+ "kind": "Name",
1429
+ "value": "description"
1430
+ }
1431
+ }
1432
+ }
1433
+ ],
1434
+ "directives": [],
1435
+ "selectionSet": {
1436
+ "kind": "SelectionSet",
1437
+ "selections": [{
1438
+ "kind": "FragmentSpread",
1439
+ "name": {
1440
+ "kind": "Name",
1441
+ "value": "WorkflowTestCaseFields"
1442
+ },
1443
+ "directives": []
1444
+ }]
1445
+ }
1446
+ }]
1447
+ }
1448
+ },
1449
+ {
1450
+ "kind": "FragmentDefinition",
1451
+ "name": {
1452
+ "kind": "Name",
1453
+ "value": "WorkflowTestCaseFields"
1454
+ },
1455
+ "variableDefinitions": [],
1456
+ "typeCondition": {
1457
+ "kind": "NamedType",
1458
+ "name": {
1459
+ "kind": "Name",
1460
+ "value": "WorkflowTestCase"
1461
+ }
1462
+ },
1463
+ "directives": [],
1464
+ "selectionSet": {
1465
+ "kind": "SelectionSet",
1466
+ "selections": [
1467
+ {
1468
+ "kind": "Field",
1469
+ "name": {
1470
+ "kind": "Name",
1471
+ "value": "id"
1472
+ },
1473
+ "arguments": [],
1474
+ "directives": []
1475
+ },
1476
+ {
1477
+ "kind": "Field",
1478
+ "name": {
1479
+ "kind": "Name",
1480
+ "value": "workflowKey"
1481
+ },
1482
+ "arguments": [],
1483
+ "directives": []
1484
+ },
1485
+ {
1486
+ "kind": "Field",
1487
+ "name": {
1488
+ "kind": "Name",
1489
+ "value": "name"
1490
+ },
1491
+ "arguments": [],
1492
+ "directives": []
1493
+ },
1494
+ {
1495
+ "kind": "Field",
1496
+ "name": {
1497
+ "kind": "Name",
1498
+ "value": "description"
1499
+ },
1500
+ "arguments": [],
1501
+ "directives": []
1502
+ },
1503
+ {
1504
+ "kind": "Field",
1505
+ "name": {
1506
+ "kind": "Name",
1507
+ "value": "triggerNodeId"
1508
+ },
1509
+ "arguments": [],
1510
+ "directives": []
1511
+ },
1512
+ {
1513
+ "kind": "Field",
1514
+ "name": {
1515
+ "kind": "Name",
1516
+ "value": "triggerData"
1517
+ },
1518
+ "arguments": [],
1519
+ "directives": []
1520
+ },
1521
+ {
1522
+ "kind": "Field",
1523
+ "name": {
1524
+ "kind": "Name",
1525
+ "value": "pinnedOutputs"
1526
+ },
1527
+ "arguments": [],
1528
+ "directives": []
1529
+ },
1530
+ {
1531
+ "kind": "Field",
1532
+ "name": {
1533
+ "kind": "Name",
1534
+ "value": "connectionMocks"
1535
+ },
1536
+ "arguments": [],
1537
+ "directives": [],
1538
+ "selectionSet": {
1539
+ "kind": "SelectionSet",
1540
+ "selections": [
1541
+ {
1542
+ "kind": "Field",
1543
+ "name": {
1544
+ "kind": "Name",
1545
+ "value": "nodeId"
1546
+ },
1547
+ "arguments": [],
1548
+ "directives": []
1549
+ },
1550
+ {
1551
+ "kind": "Field",
1552
+ "name": {
1553
+ "kind": "Name",
1554
+ "value": "operation"
1555
+ },
1556
+ "arguments": [],
1557
+ "directives": []
1558
+ },
1559
+ {
1560
+ "kind": "Field",
1561
+ "name": {
1562
+ "kind": "Name",
1563
+ "value": "response"
1564
+ },
1565
+ "arguments": [],
1566
+ "directives": []
1567
+ },
1568
+ {
1569
+ "kind": "Field",
1570
+ "name": {
1571
+ "kind": "Name",
1572
+ "value": "error"
1573
+ },
1574
+ "arguments": [],
1575
+ "directives": [],
1576
+ "selectionSet": {
1577
+ "kind": "SelectionSet",
1578
+ "selections": [{
1579
+ "kind": "Field",
1580
+ "name": {
1581
+ "kind": "Name",
1582
+ "value": "message"
1583
+ },
1584
+ "arguments": [],
1585
+ "directives": []
1586
+ }, {
1587
+ "kind": "Field",
1588
+ "name": {
1589
+ "kind": "Name",
1590
+ "value": "errorType"
1591
+ },
1592
+ "arguments": [],
1593
+ "directives": []
1594
+ }]
1595
+ }
1596
+ }
1597
+ ]
1598
+ }
1599
+ },
1600
+ {
1601
+ "kind": "Field",
1602
+ "name": {
1603
+ "kind": "Name",
1604
+ "value": "expectedStatus"
1605
+ },
1606
+ "arguments": [],
1607
+ "directives": []
1608
+ },
1609
+ {
1610
+ "kind": "Field",
1611
+ "name": {
1612
+ "kind": "Name",
1613
+ "value": "expectations"
1614
+ },
1615
+ "arguments": [],
1616
+ "directives": [],
1617
+ "selectionSet": {
1618
+ "kind": "SelectionSet",
1619
+ "selections": [{
1620
+ "kind": "Field",
1621
+ "name": {
1622
+ "kind": "Name",
1623
+ "value": "nodeId"
1624
+ },
1625
+ "arguments": [],
1626
+ "directives": []
1627
+ }, {
1628
+ "kind": "Field",
1629
+ "name": {
1630
+ "kind": "Name",
1631
+ "value": "rules"
1632
+ },
1633
+ "arguments": [],
1634
+ "directives": [],
1635
+ "selectionSet": {
1636
+ "kind": "SelectionSet",
1637
+ "selections": [
1638
+ {
1639
+ "kind": "Field",
1640
+ "name": {
1641
+ "kind": "Name",
1642
+ "value": "path"
1643
+ },
1644
+ "arguments": [],
1645
+ "directives": []
1646
+ },
1647
+ {
1648
+ "kind": "Field",
1649
+ "name": {
1650
+ "kind": "Name",
1651
+ "value": "operator"
1652
+ },
1653
+ "arguments": [],
1654
+ "directives": []
1655
+ },
1656
+ {
1657
+ "kind": "Field",
1658
+ "name": {
1659
+ "kind": "Name",
1660
+ "value": "expected"
1661
+ },
1662
+ "arguments": [],
1663
+ "directives": []
1664
+ },
1665
+ {
1666
+ "kind": "Field",
1667
+ "name": {
1668
+ "kind": "Name",
1669
+ "value": "min"
1670
+ },
1671
+ "arguments": [],
1672
+ "directives": []
1673
+ },
1674
+ {
1675
+ "kind": "Field",
1676
+ "name": {
1677
+ "kind": "Name",
1678
+ "value": "max"
1679
+ },
1680
+ "arguments": [],
1681
+ "directives": []
1682
+ },
1683
+ {
1684
+ "kind": "Field",
1685
+ "name": {
1686
+ "kind": "Name",
1687
+ "value": "message"
1688
+ },
1689
+ "arguments": [],
1690
+ "directives": []
1691
+ }
1692
+ ]
1693
+ }
1694
+ }]
1695
+ }
1696
+ },
1697
+ {
1698
+ "kind": "Field",
1699
+ "name": {
1700
+ "kind": "Name",
1701
+ "value": "enabled"
1702
+ },
1703
+ "arguments": [],
1704
+ "directives": []
1705
+ },
1706
+ {
1707
+ "kind": "Field",
1708
+ "name": {
1709
+ "kind": "Name",
1710
+ "value": "sortOrder"
1711
+ },
1712
+ "arguments": [],
1713
+ "directives": []
1714
+ },
1715
+ {
1716
+ "kind": "Field",
1717
+ "name": {
1718
+ "kind": "Name",
1719
+ "value": "createdBy"
1720
+ },
1721
+ "arguments": [],
1722
+ "directives": []
1723
+ },
1724
+ {
1725
+ "kind": "Field",
1726
+ "name": {
1727
+ "kind": "Name",
1728
+ "value": "updatedBy"
1729
+ },
1730
+ "arguments": [],
1731
+ "directives": []
1732
+ },
1733
+ {
1734
+ "kind": "Field",
1735
+ "name": {
1736
+ "kind": "Name",
1737
+ "value": "createdAt"
1738
+ },
1739
+ "arguments": [],
1740
+ "directives": []
1741
+ },
1742
+ {
1743
+ "kind": "Field",
1744
+ "name": {
1745
+ "kind": "Name",
1746
+ "value": "updatedAt"
1747
+ },
1748
+ "arguments": [],
1749
+ "directives": []
1750
+ },
1751
+ {
1752
+ "kind": "Field",
1753
+ "name": {
1754
+ "kind": "Name",
1755
+ "value": "lastResult"
1756
+ },
1757
+ "arguments": [],
1758
+ "directives": [],
1759
+ "selectionSet": {
1760
+ "kind": "SelectionSet",
1761
+ "selections": [{
1762
+ "kind": "FragmentSpread",
1763
+ "name": {
1764
+ "kind": "Name",
1765
+ "value": "WorkflowTestCaseResultFields"
1766
+ },
1767
+ "directives": []
1768
+ }]
1769
+ }
1770
+ }
1771
+ ]
1772
+ }
1773
+ },
1774
+ {
1775
+ "kind": "FragmentDefinition",
1776
+ "name": {
1777
+ "kind": "Name",
1778
+ "value": "WorkflowTestCaseResultFields"
1779
+ },
1780
+ "variableDefinitions": [],
1781
+ "typeCondition": {
1782
+ "kind": "NamedType",
1783
+ "name": {
1784
+ "kind": "Name",
1785
+ "value": "WorkflowTestCaseResult"
1786
+ }
1787
+ },
1788
+ "directives": [],
1789
+ "selectionSet": {
1790
+ "kind": "SelectionSet",
1791
+ "selections": [
1792
+ {
1793
+ "kind": "Field",
1794
+ "name": {
1795
+ "kind": "Name",
1796
+ "value": "caseId"
1797
+ },
1798
+ "arguments": [],
1799
+ "directives": []
1800
+ },
1801
+ {
1802
+ "kind": "Field",
1803
+ "name": {
1804
+ "kind": "Name",
1805
+ "value": "caseName"
1806
+ },
1807
+ "arguments": [],
1808
+ "directives": []
1809
+ },
1810
+ {
1811
+ "kind": "Field",
1812
+ "name": {
1813
+ "kind": "Name",
1814
+ "value": "runId"
1815
+ },
1816
+ "arguments": [],
1817
+ "directives": []
1818
+ },
1819
+ {
1820
+ "kind": "Field",
1821
+ "name": {
1822
+ "kind": "Name",
1823
+ "value": "status"
1824
+ },
1825
+ "arguments": [],
1826
+ "directives": []
1827
+ },
1828
+ {
1829
+ "kind": "Field",
1830
+ "name": {
1831
+ "kind": "Name",
1832
+ "value": "runStatus"
1833
+ },
1834
+ "arguments": [],
1835
+ "directives": []
1836
+ },
1837
+ {
1838
+ "kind": "Field",
1839
+ "name": {
1840
+ "kind": "Name",
1841
+ "value": "failures"
1842
+ },
1843
+ "arguments": [],
1844
+ "directives": [],
1845
+ "selectionSet": {
1846
+ "kind": "SelectionSet",
1847
+ "selections": [
1848
+ {
1849
+ "kind": "Field",
1850
+ "name": {
1851
+ "kind": "Name",
1852
+ "value": "nodeId"
1853
+ },
1854
+ "arguments": [],
1855
+ "directives": []
1856
+ },
1857
+ {
1858
+ "kind": "Field",
1859
+ "name": {
1860
+ "kind": "Name",
1861
+ "value": "code"
1862
+ },
1863
+ "arguments": [],
1864
+ "directives": []
1865
+ },
1866
+ {
1867
+ "kind": "Field",
1868
+ "name": {
1869
+ "kind": "Name",
1870
+ "value": "message"
1871
+ },
1872
+ "arguments": [],
1873
+ "directives": []
1874
+ }
1875
+ ]
1876
+ }
1877
+ },
1878
+ {
1879
+ "kind": "Field",
1880
+ "name": {
1881
+ "kind": "Name",
1882
+ "value": "completedAt"
1883
+ },
1884
+ "arguments": [],
1885
+ "directives": []
1886
+ }
1887
+ ]
1888
+ }
1889
+ }
1890
+ ]
1891
+ };
1892
+
1893
+ // src/generated/documents/wspace/RunWorkflowTestsDocument.ts
1894
+ const RunWorkflowTestsDocument = {
1895
+ "kind": "Document",
1896
+ "definitions": [
1897
+ {
1898
+ "kind": "OperationDefinition",
1899
+ "operation": "mutation",
1900
+ "name": {
1901
+ "kind": "Name",
1902
+ "value": "RunWorkflowTests"
1903
+ },
1904
+ "variableDefinitions": [{
1905
+ "kind": "VariableDefinition",
1906
+ "variable": {
1907
+ "kind": "Variable",
1908
+ "name": {
1909
+ "kind": "Name",
1910
+ "value": "input"
1911
+ }
1912
+ },
1913
+ "type": {
1914
+ "kind": "NonNullType",
1915
+ "type": {
1916
+ "kind": "NamedType",
1917
+ "name": {
1918
+ "kind": "Name",
1919
+ "value": "RunWorkflowTestsInput"
1920
+ }
1921
+ }
1922
+ },
1923
+ "directives": []
1924
+ }],
1925
+ "directives": [],
1926
+ "selectionSet": {
1927
+ "kind": "SelectionSet",
1928
+ "selections": [{
1929
+ "kind": "Field",
1930
+ "name": {
1931
+ "kind": "Name",
1932
+ "value": "runWorkflowTests"
1933
+ },
1934
+ "arguments": [{
1935
+ "kind": "Argument",
1936
+ "name": {
1937
+ "kind": "Name",
1938
+ "value": "input"
1939
+ },
1940
+ "value": {
1941
+ "kind": "Variable",
1942
+ "name": {
1943
+ "kind": "Name",
1944
+ "value": "input"
1945
+ }
1946
+ }
1947
+ }],
1948
+ "directives": [],
1949
+ "selectionSet": {
1950
+ "kind": "SelectionSet",
1951
+ "selections": [{
1952
+ "kind": "FragmentSpread",
1953
+ "name": {
1954
+ "kind": "Name",
1955
+ "value": "WorkflowTestRunFields"
1956
+ },
1957
+ "directives": []
1958
+ }]
1959
+ }
1960
+ }]
1961
+ }
1962
+ },
1963
+ {
1964
+ "kind": "FragmentDefinition",
1965
+ "name": {
1966
+ "kind": "Name",
1967
+ "value": "WorkflowTestCaseResultFields"
1968
+ },
1969
+ "variableDefinitions": [],
1970
+ "typeCondition": {
1971
+ "kind": "NamedType",
1972
+ "name": {
1973
+ "kind": "Name",
1974
+ "value": "WorkflowTestCaseResult"
1975
+ }
1976
+ },
1977
+ "directives": [],
1978
+ "selectionSet": {
1979
+ "kind": "SelectionSet",
1980
+ "selections": [
1981
+ {
1982
+ "kind": "Field",
1983
+ "name": {
1984
+ "kind": "Name",
1985
+ "value": "caseId"
1986
+ },
1987
+ "arguments": [],
1988
+ "directives": []
1989
+ },
1990
+ {
1991
+ "kind": "Field",
1992
+ "name": {
1993
+ "kind": "Name",
1994
+ "value": "caseName"
1995
+ },
1996
+ "arguments": [],
1997
+ "directives": []
1998
+ },
1999
+ {
2000
+ "kind": "Field",
2001
+ "name": {
2002
+ "kind": "Name",
2003
+ "value": "runId"
2004
+ },
2005
+ "arguments": [],
2006
+ "directives": []
2007
+ },
2008
+ {
2009
+ "kind": "Field",
2010
+ "name": {
2011
+ "kind": "Name",
2012
+ "value": "status"
2013
+ },
2014
+ "arguments": [],
2015
+ "directives": []
2016
+ },
2017
+ {
2018
+ "kind": "Field",
2019
+ "name": {
2020
+ "kind": "Name",
2021
+ "value": "runStatus"
2022
+ },
2023
+ "arguments": [],
2024
+ "directives": []
2025
+ },
2026
+ {
2027
+ "kind": "Field",
2028
+ "name": {
2029
+ "kind": "Name",
2030
+ "value": "failures"
2031
+ },
2032
+ "arguments": [],
2033
+ "directives": [],
2034
+ "selectionSet": {
2035
+ "kind": "SelectionSet",
2036
+ "selections": [
2037
+ {
2038
+ "kind": "Field",
2039
+ "name": {
2040
+ "kind": "Name",
2041
+ "value": "nodeId"
2042
+ },
2043
+ "arguments": [],
2044
+ "directives": []
2045
+ },
2046
+ {
2047
+ "kind": "Field",
2048
+ "name": {
2049
+ "kind": "Name",
2050
+ "value": "code"
2051
+ },
2052
+ "arguments": [],
2053
+ "directives": []
2054
+ },
2055
+ {
2056
+ "kind": "Field",
2057
+ "name": {
2058
+ "kind": "Name",
2059
+ "value": "message"
2060
+ },
2061
+ "arguments": [],
2062
+ "directives": []
2063
+ }
2064
+ ]
2065
+ }
2066
+ },
2067
+ {
2068
+ "kind": "Field",
2069
+ "name": {
2070
+ "kind": "Name",
2071
+ "value": "completedAt"
2072
+ },
2073
+ "arguments": [],
2074
+ "directives": []
2075
+ }
2076
+ ]
2077
+ }
2078
+ },
2079
+ {
2080
+ "kind": "FragmentDefinition",
2081
+ "name": {
2082
+ "kind": "Name",
2083
+ "value": "WorkflowTestRunFields"
2084
+ },
2085
+ "variableDefinitions": [],
2086
+ "typeCondition": {
2087
+ "kind": "NamedType",
2088
+ "name": {
2089
+ "kind": "Name",
2090
+ "value": "WorkflowTestRun"
2091
+ }
2092
+ },
2093
+ "directives": [],
2094
+ "selectionSet": {
2095
+ "kind": "SelectionSet",
2096
+ "selections": [
2097
+ {
2098
+ "kind": "Field",
2099
+ "name": {
2100
+ "kind": "Name",
2101
+ "value": "id"
2102
+ },
2103
+ "arguments": [],
2104
+ "directives": []
2105
+ },
2106
+ {
2107
+ "kind": "Field",
2108
+ "name": {
2109
+ "kind": "Name",
2110
+ "value": "workflowKey"
2111
+ },
2112
+ "arguments": [],
2113
+ "directives": []
2114
+ },
2115
+ {
2116
+ "kind": "Field",
2117
+ "name": {
2118
+ "kind": "Name",
2119
+ "value": "version"
2120
+ },
2121
+ "arguments": [],
2122
+ "directives": []
2123
+ },
2124
+ {
2125
+ "kind": "Field",
2126
+ "name": {
2127
+ "kind": "Name",
2128
+ "value": "status"
2129
+ },
2130
+ "arguments": [],
2131
+ "directives": []
2132
+ },
2133
+ {
2134
+ "kind": "Field",
2135
+ "name": {
2136
+ "kind": "Name",
2137
+ "value": "source"
2138
+ },
2139
+ "arguments": [],
2140
+ "directives": []
2141
+ },
2142
+ {
2143
+ "kind": "Field",
2144
+ "name": {
2145
+ "kind": "Name",
2146
+ "value": "triggeredBy"
2147
+ },
2148
+ "arguments": [],
2149
+ "directives": []
2150
+ },
2151
+ {
2152
+ "kind": "Field",
2153
+ "name": {
2154
+ "kind": "Name",
2155
+ "value": "startedAt"
2156
+ },
2157
+ "arguments": [],
2158
+ "directives": []
2159
+ },
2160
+ {
2161
+ "kind": "Field",
2162
+ "name": {
2163
+ "kind": "Name",
2164
+ "value": "completedAt"
2165
+ },
2166
+ "arguments": [],
2167
+ "directives": []
2168
+ },
2169
+ {
2170
+ "kind": "Field",
2171
+ "name": {
2172
+ "kind": "Name",
2173
+ "value": "summary"
2174
+ },
2175
+ "arguments": [],
2176
+ "directives": [],
2177
+ "selectionSet": {
2178
+ "kind": "SelectionSet",
2179
+ "selections": [
2180
+ {
2181
+ "kind": "Field",
2182
+ "name": {
2183
+ "kind": "Name",
2184
+ "value": "total"
2185
+ },
2186
+ "arguments": [],
2187
+ "directives": []
2188
+ },
2189
+ {
2190
+ "kind": "Field",
2191
+ "name": {
2192
+ "kind": "Name",
2193
+ "value": "passed"
2194
+ },
2195
+ "arguments": [],
2196
+ "directives": []
2197
+ },
2198
+ {
2199
+ "kind": "Field",
2200
+ "name": {
2201
+ "kind": "Name",
2202
+ "value": "failed"
2203
+ },
2204
+ "arguments": [],
2205
+ "directives": []
2206
+ },
2207
+ {
2208
+ "kind": "Field",
2209
+ "name": {
2210
+ "kind": "Name",
2211
+ "value": "errored"
2212
+ },
2213
+ "arguments": [],
2214
+ "directives": []
2215
+ },
2216
+ {
2217
+ "kind": "Field",
2218
+ "name": {
2219
+ "kind": "Name",
2220
+ "value": "pending"
2221
+ },
2222
+ "arguments": [],
2223
+ "directives": []
2224
+ }
2225
+ ]
2226
+ }
2227
+ },
2228
+ {
2229
+ "kind": "Field",
2230
+ "name": {
2231
+ "kind": "Name",
2232
+ "value": "results"
2233
+ },
2234
+ "arguments": [],
2235
+ "directives": [],
2236
+ "selectionSet": {
2237
+ "kind": "SelectionSet",
2238
+ "selections": [{
2239
+ "kind": "FragmentSpread",
2240
+ "name": {
2241
+ "kind": "Name",
2242
+ "value": "WorkflowTestCaseResultFields"
2243
+ },
2244
+ "directives": []
2245
+ }]
2246
+ }
2247
+ }
2248
+ ]
2249
+ }
2250
+ }
2251
+ ]
2252
+ };
2253
+
2254
+ // src/generated/documents/wspace/WorkflowTestCasesDocument.ts
2255
+ const WorkflowTestCasesDocument = {
2256
+ "kind": "Document",
2257
+ "definitions": [
2258
+ {
2259
+ "kind": "OperationDefinition",
2260
+ "operation": "query",
2261
+ "name": {
2262
+ "kind": "Name",
2263
+ "value": "WorkflowTestCases"
2264
+ },
2265
+ "variableDefinitions": [{
2266
+ "kind": "VariableDefinition",
2267
+ "variable": {
2268
+ "kind": "Variable",
2269
+ "name": {
2270
+ "kind": "Name",
2271
+ "value": "workflowKey"
2272
+ }
2273
+ },
2274
+ "type": {
2275
+ "kind": "NonNullType",
2276
+ "type": {
2277
+ "kind": "NamedType",
2278
+ "name": {
2279
+ "kind": "Name",
2280
+ "value": "String"
2281
+ }
2282
+ }
2283
+ },
2284
+ "directives": []
2285
+ }],
2286
+ "directives": [],
2287
+ "selectionSet": {
2288
+ "kind": "SelectionSet",
2289
+ "selections": [{
2290
+ "kind": "Field",
2291
+ "name": {
2292
+ "kind": "Name",
2293
+ "value": "workflowTestCases"
2294
+ },
2295
+ "arguments": [{
2296
+ "kind": "Argument",
2297
+ "name": {
2298
+ "kind": "Name",
2299
+ "value": "workflowKey"
2300
+ },
2301
+ "value": {
2302
+ "kind": "Variable",
2303
+ "name": {
2304
+ "kind": "Name",
2305
+ "value": "workflowKey"
2306
+ }
2307
+ }
2308
+ }],
2309
+ "directives": [],
2310
+ "selectionSet": {
2311
+ "kind": "SelectionSet",
2312
+ "selections": [{
2313
+ "kind": "FragmentSpread",
2314
+ "name": {
2315
+ "kind": "Name",
2316
+ "value": "WorkflowTestCaseFields"
2317
+ },
2318
+ "directives": []
2319
+ }]
2320
+ }
2321
+ }]
2322
+ }
2323
+ },
2324
+ {
2325
+ "kind": "FragmentDefinition",
2326
+ "name": {
2327
+ "kind": "Name",
2328
+ "value": "WorkflowTestCaseFields"
2329
+ },
2330
+ "variableDefinitions": [],
2331
+ "typeCondition": {
2332
+ "kind": "NamedType",
2333
+ "name": {
2334
+ "kind": "Name",
2335
+ "value": "WorkflowTestCase"
2336
+ }
2337
+ },
2338
+ "directives": [],
2339
+ "selectionSet": {
2340
+ "kind": "SelectionSet",
2341
+ "selections": [
2342
+ {
2343
+ "kind": "Field",
2344
+ "name": {
2345
+ "kind": "Name",
2346
+ "value": "id"
2347
+ },
2348
+ "arguments": [],
2349
+ "directives": []
2350
+ },
2351
+ {
2352
+ "kind": "Field",
2353
+ "name": {
2354
+ "kind": "Name",
2355
+ "value": "workflowKey"
2356
+ },
2357
+ "arguments": [],
2358
+ "directives": []
2359
+ },
2360
+ {
2361
+ "kind": "Field",
2362
+ "name": {
2363
+ "kind": "Name",
2364
+ "value": "name"
2365
+ },
2366
+ "arguments": [],
2367
+ "directives": []
2368
+ },
2369
+ {
2370
+ "kind": "Field",
2371
+ "name": {
2372
+ "kind": "Name",
2373
+ "value": "description"
2374
+ },
2375
+ "arguments": [],
2376
+ "directives": []
2377
+ },
2378
+ {
2379
+ "kind": "Field",
2380
+ "name": {
2381
+ "kind": "Name",
2382
+ "value": "triggerNodeId"
2383
+ },
2384
+ "arguments": [],
2385
+ "directives": []
2386
+ },
2387
+ {
2388
+ "kind": "Field",
2389
+ "name": {
2390
+ "kind": "Name",
2391
+ "value": "triggerData"
2392
+ },
2393
+ "arguments": [],
2394
+ "directives": []
2395
+ },
2396
+ {
2397
+ "kind": "Field",
2398
+ "name": {
2399
+ "kind": "Name",
2400
+ "value": "pinnedOutputs"
2401
+ },
2402
+ "arguments": [],
2403
+ "directives": []
2404
+ },
2405
+ {
2406
+ "kind": "Field",
2407
+ "name": {
2408
+ "kind": "Name",
2409
+ "value": "connectionMocks"
2410
+ },
2411
+ "arguments": [],
2412
+ "directives": [],
2413
+ "selectionSet": {
2414
+ "kind": "SelectionSet",
2415
+ "selections": [
2416
+ {
2417
+ "kind": "Field",
2418
+ "name": {
2419
+ "kind": "Name",
2420
+ "value": "nodeId"
2421
+ },
2422
+ "arguments": [],
2423
+ "directives": []
2424
+ },
2425
+ {
2426
+ "kind": "Field",
2427
+ "name": {
2428
+ "kind": "Name",
2429
+ "value": "operation"
2430
+ },
2431
+ "arguments": [],
2432
+ "directives": []
2433
+ },
2434
+ {
2435
+ "kind": "Field",
2436
+ "name": {
2437
+ "kind": "Name",
2438
+ "value": "response"
2439
+ },
2440
+ "arguments": [],
2441
+ "directives": []
2442
+ },
2443
+ {
2444
+ "kind": "Field",
2445
+ "name": {
2446
+ "kind": "Name",
2447
+ "value": "error"
2448
+ },
2449
+ "arguments": [],
2450
+ "directives": [],
2451
+ "selectionSet": {
2452
+ "kind": "SelectionSet",
2453
+ "selections": [{
2454
+ "kind": "Field",
2455
+ "name": {
2456
+ "kind": "Name",
2457
+ "value": "message"
2458
+ },
2459
+ "arguments": [],
2460
+ "directives": []
2461
+ }, {
2462
+ "kind": "Field",
2463
+ "name": {
2464
+ "kind": "Name",
2465
+ "value": "errorType"
2466
+ },
2467
+ "arguments": [],
2468
+ "directives": []
2469
+ }]
2470
+ }
2471
+ }
2472
+ ]
2473
+ }
2474
+ },
2475
+ {
2476
+ "kind": "Field",
2477
+ "name": {
2478
+ "kind": "Name",
2479
+ "value": "expectedStatus"
2480
+ },
2481
+ "arguments": [],
2482
+ "directives": []
2483
+ },
2484
+ {
2485
+ "kind": "Field",
2486
+ "name": {
2487
+ "kind": "Name",
2488
+ "value": "expectations"
2489
+ },
2490
+ "arguments": [],
2491
+ "directives": [],
2492
+ "selectionSet": {
2493
+ "kind": "SelectionSet",
2494
+ "selections": [{
2495
+ "kind": "Field",
2496
+ "name": {
2497
+ "kind": "Name",
2498
+ "value": "nodeId"
2499
+ },
2500
+ "arguments": [],
2501
+ "directives": []
2502
+ }, {
2503
+ "kind": "Field",
2504
+ "name": {
2505
+ "kind": "Name",
2506
+ "value": "rules"
2507
+ },
2508
+ "arguments": [],
2509
+ "directives": [],
2510
+ "selectionSet": {
2511
+ "kind": "SelectionSet",
2512
+ "selections": [
2513
+ {
2514
+ "kind": "Field",
2515
+ "name": {
2516
+ "kind": "Name",
2517
+ "value": "path"
2518
+ },
2519
+ "arguments": [],
2520
+ "directives": []
2521
+ },
2522
+ {
2523
+ "kind": "Field",
2524
+ "name": {
2525
+ "kind": "Name",
2526
+ "value": "operator"
2527
+ },
2528
+ "arguments": [],
2529
+ "directives": []
2530
+ },
2531
+ {
2532
+ "kind": "Field",
2533
+ "name": {
2534
+ "kind": "Name",
2535
+ "value": "expected"
2536
+ },
2537
+ "arguments": [],
2538
+ "directives": []
2539
+ },
2540
+ {
2541
+ "kind": "Field",
2542
+ "name": {
2543
+ "kind": "Name",
2544
+ "value": "min"
2545
+ },
2546
+ "arguments": [],
2547
+ "directives": []
2548
+ },
2549
+ {
2550
+ "kind": "Field",
2551
+ "name": {
2552
+ "kind": "Name",
2553
+ "value": "max"
2554
+ },
2555
+ "arguments": [],
2556
+ "directives": []
2557
+ },
2558
+ {
2559
+ "kind": "Field",
2560
+ "name": {
2561
+ "kind": "Name",
2562
+ "value": "message"
2563
+ },
2564
+ "arguments": [],
2565
+ "directives": []
2566
+ }
2567
+ ]
2568
+ }
2569
+ }]
2570
+ }
2571
+ },
2572
+ {
2573
+ "kind": "Field",
2574
+ "name": {
2575
+ "kind": "Name",
2576
+ "value": "enabled"
2577
+ },
2578
+ "arguments": [],
2579
+ "directives": []
2580
+ },
2581
+ {
2582
+ "kind": "Field",
2583
+ "name": {
2584
+ "kind": "Name",
2585
+ "value": "sortOrder"
2586
+ },
2587
+ "arguments": [],
2588
+ "directives": []
2589
+ },
2590
+ {
2591
+ "kind": "Field",
2592
+ "name": {
2593
+ "kind": "Name",
2594
+ "value": "createdBy"
2595
+ },
2596
+ "arguments": [],
2597
+ "directives": []
2598
+ },
2599
+ {
2600
+ "kind": "Field",
2601
+ "name": {
2602
+ "kind": "Name",
2603
+ "value": "updatedBy"
2604
+ },
2605
+ "arguments": [],
2606
+ "directives": []
2607
+ },
2608
+ {
2609
+ "kind": "Field",
2610
+ "name": {
2611
+ "kind": "Name",
2612
+ "value": "createdAt"
2613
+ },
2614
+ "arguments": [],
2615
+ "directives": []
2616
+ },
2617
+ {
2618
+ "kind": "Field",
2619
+ "name": {
2620
+ "kind": "Name",
2621
+ "value": "updatedAt"
2622
+ },
2623
+ "arguments": [],
2624
+ "directives": []
2625
+ },
2626
+ {
2627
+ "kind": "Field",
2628
+ "name": {
2629
+ "kind": "Name",
2630
+ "value": "lastResult"
2631
+ },
2632
+ "arguments": [],
2633
+ "directives": [],
2634
+ "selectionSet": {
2635
+ "kind": "SelectionSet",
2636
+ "selections": [{
2637
+ "kind": "FragmentSpread",
2638
+ "name": {
2639
+ "kind": "Name",
2640
+ "value": "WorkflowTestCaseResultFields"
2641
+ },
2642
+ "directives": []
2643
+ }]
2644
+ }
2645
+ }
2646
+ ]
2647
+ }
2648
+ },
2649
+ {
2650
+ "kind": "FragmentDefinition",
2651
+ "name": {
2652
+ "kind": "Name",
2653
+ "value": "WorkflowTestCaseResultFields"
2654
+ },
2655
+ "variableDefinitions": [],
2656
+ "typeCondition": {
2657
+ "kind": "NamedType",
2658
+ "name": {
2659
+ "kind": "Name",
2660
+ "value": "WorkflowTestCaseResult"
2661
+ }
2662
+ },
2663
+ "directives": [],
2664
+ "selectionSet": {
2665
+ "kind": "SelectionSet",
2666
+ "selections": [
2667
+ {
2668
+ "kind": "Field",
2669
+ "name": {
2670
+ "kind": "Name",
2671
+ "value": "caseId"
2672
+ },
2673
+ "arguments": [],
2674
+ "directives": []
2675
+ },
2676
+ {
2677
+ "kind": "Field",
2678
+ "name": {
2679
+ "kind": "Name",
2680
+ "value": "caseName"
2681
+ },
2682
+ "arguments": [],
2683
+ "directives": []
2684
+ },
2685
+ {
2686
+ "kind": "Field",
2687
+ "name": {
2688
+ "kind": "Name",
2689
+ "value": "runId"
2690
+ },
2691
+ "arguments": [],
2692
+ "directives": []
2693
+ },
2694
+ {
2695
+ "kind": "Field",
2696
+ "name": {
2697
+ "kind": "Name",
2698
+ "value": "status"
2699
+ },
2700
+ "arguments": [],
2701
+ "directives": []
2702
+ },
2703
+ {
2704
+ "kind": "Field",
2705
+ "name": {
2706
+ "kind": "Name",
2707
+ "value": "runStatus"
2708
+ },
2709
+ "arguments": [],
2710
+ "directives": []
2711
+ },
2712
+ {
2713
+ "kind": "Field",
2714
+ "name": {
2715
+ "kind": "Name",
2716
+ "value": "failures"
2717
+ },
2718
+ "arguments": [],
2719
+ "directives": [],
2720
+ "selectionSet": {
2721
+ "kind": "SelectionSet",
2722
+ "selections": [
2723
+ {
2724
+ "kind": "Field",
2725
+ "name": {
2726
+ "kind": "Name",
2727
+ "value": "nodeId"
2728
+ },
2729
+ "arguments": [],
2730
+ "directives": []
2731
+ },
2732
+ {
2733
+ "kind": "Field",
2734
+ "name": {
2735
+ "kind": "Name",
2736
+ "value": "code"
2737
+ },
2738
+ "arguments": [],
2739
+ "directives": []
2740
+ },
2741
+ {
2742
+ "kind": "Field",
2743
+ "name": {
2744
+ "kind": "Name",
2745
+ "value": "message"
2746
+ },
2747
+ "arguments": [],
2748
+ "directives": []
2749
+ }
2750
+ ]
2751
+ }
2752
+ },
2753
+ {
2754
+ "kind": "Field",
2755
+ "name": {
2756
+ "kind": "Name",
2757
+ "value": "completedAt"
2758
+ },
2759
+ "arguments": [],
2760
+ "directives": []
2761
+ }
2762
+ ]
2763
+ }
2764
+ }
2765
+ ]
2766
+ };
2767
+
2768
+ // src/generated/documents/wspace/WorkflowTestRunDocument.ts
2769
+ const WorkflowTestRunDocument = {
2770
+ "kind": "Document",
2771
+ "definitions": [
2772
+ {
2773
+ "kind": "OperationDefinition",
2774
+ "operation": "query",
2775
+ "name": {
2776
+ "kind": "Name",
2777
+ "value": "WorkflowTestRun"
2778
+ },
2779
+ "variableDefinitions": [{
2780
+ "kind": "VariableDefinition",
2781
+ "variable": {
2782
+ "kind": "Variable",
2783
+ "name": {
2784
+ "kind": "Name",
2785
+ "value": "id"
2786
+ }
2787
+ },
2788
+ "type": {
2789
+ "kind": "NonNullType",
2790
+ "type": {
2791
+ "kind": "NamedType",
2792
+ "name": {
2793
+ "kind": "Name",
2794
+ "value": "ID"
2795
+ }
2796
+ }
2797
+ },
2798
+ "directives": []
2799
+ }],
2800
+ "directives": [],
2801
+ "selectionSet": {
2802
+ "kind": "SelectionSet",
2803
+ "selections": [{
2804
+ "kind": "Field",
2805
+ "name": {
2806
+ "kind": "Name",
2807
+ "value": "workflowTestRun"
2808
+ },
2809
+ "arguments": [{
2810
+ "kind": "Argument",
2811
+ "name": {
2812
+ "kind": "Name",
2813
+ "value": "id"
2814
+ },
2815
+ "value": {
2816
+ "kind": "Variable",
2817
+ "name": {
2818
+ "kind": "Name",
2819
+ "value": "id"
2820
+ }
2821
+ }
2822
+ }],
2823
+ "directives": [],
2824
+ "selectionSet": {
2825
+ "kind": "SelectionSet",
2826
+ "selections": [{
2827
+ "kind": "FragmentSpread",
2828
+ "name": {
2829
+ "kind": "Name",
2830
+ "value": "WorkflowTestRunFields"
2831
+ },
2832
+ "directives": []
2833
+ }]
2834
+ }
2835
+ }]
2836
+ }
2837
+ },
2838
+ {
2839
+ "kind": "FragmentDefinition",
2840
+ "name": {
2841
+ "kind": "Name",
2842
+ "value": "WorkflowTestCaseResultFields"
2843
+ },
2844
+ "variableDefinitions": [],
2845
+ "typeCondition": {
2846
+ "kind": "NamedType",
2847
+ "name": {
2848
+ "kind": "Name",
2849
+ "value": "WorkflowTestCaseResult"
2850
+ }
2851
+ },
2852
+ "directives": [],
2853
+ "selectionSet": {
2854
+ "kind": "SelectionSet",
2855
+ "selections": [
2856
+ {
2857
+ "kind": "Field",
2858
+ "name": {
2859
+ "kind": "Name",
2860
+ "value": "caseId"
2861
+ },
2862
+ "arguments": [],
2863
+ "directives": []
2864
+ },
2865
+ {
2866
+ "kind": "Field",
2867
+ "name": {
2868
+ "kind": "Name",
2869
+ "value": "caseName"
2870
+ },
2871
+ "arguments": [],
2872
+ "directives": []
2873
+ },
2874
+ {
2875
+ "kind": "Field",
2876
+ "name": {
2877
+ "kind": "Name",
2878
+ "value": "runId"
2879
+ },
2880
+ "arguments": [],
2881
+ "directives": []
2882
+ },
2883
+ {
2884
+ "kind": "Field",
2885
+ "name": {
2886
+ "kind": "Name",
2887
+ "value": "status"
2888
+ },
2889
+ "arguments": [],
2890
+ "directives": []
2891
+ },
2892
+ {
2893
+ "kind": "Field",
2894
+ "name": {
2895
+ "kind": "Name",
2896
+ "value": "runStatus"
2897
+ },
2898
+ "arguments": [],
2899
+ "directives": []
2900
+ },
2901
+ {
2902
+ "kind": "Field",
2903
+ "name": {
2904
+ "kind": "Name",
2905
+ "value": "failures"
2906
+ },
2907
+ "arguments": [],
2908
+ "directives": [],
2909
+ "selectionSet": {
2910
+ "kind": "SelectionSet",
2911
+ "selections": [
2912
+ {
2913
+ "kind": "Field",
2914
+ "name": {
2915
+ "kind": "Name",
2916
+ "value": "nodeId"
2917
+ },
2918
+ "arguments": [],
2919
+ "directives": []
2920
+ },
2921
+ {
2922
+ "kind": "Field",
2923
+ "name": {
2924
+ "kind": "Name",
2925
+ "value": "code"
2926
+ },
2927
+ "arguments": [],
2928
+ "directives": []
2929
+ },
2930
+ {
2931
+ "kind": "Field",
2932
+ "name": {
2933
+ "kind": "Name",
2934
+ "value": "message"
2935
+ },
2936
+ "arguments": [],
2937
+ "directives": []
2938
+ }
2939
+ ]
2940
+ }
2941
+ },
2942
+ {
2943
+ "kind": "Field",
2944
+ "name": {
2945
+ "kind": "Name",
2946
+ "value": "completedAt"
2947
+ },
2948
+ "arguments": [],
2949
+ "directives": []
2950
+ }
2951
+ ]
2952
+ }
2953
+ },
2954
+ {
2955
+ "kind": "FragmentDefinition",
2956
+ "name": {
2957
+ "kind": "Name",
2958
+ "value": "WorkflowTestRunFields"
2959
+ },
2960
+ "variableDefinitions": [],
2961
+ "typeCondition": {
2962
+ "kind": "NamedType",
2963
+ "name": {
2964
+ "kind": "Name",
2965
+ "value": "WorkflowTestRun"
2966
+ }
2967
+ },
2968
+ "directives": [],
2969
+ "selectionSet": {
2970
+ "kind": "SelectionSet",
2971
+ "selections": [
2972
+ {
2973
+ "kind": "Field",
2974
+ "name": {
2975
+ "kind": "Name",
2976
+ "value": "id"
2977
+ },
2978
+ "arguments": [],
2979
+ "directives": []
2980
+ },
2981
+ {
2982
+ "kind": "Field",
2983
+ "name": {
2984
+ "kind": "Name",
2985
+ "value": "workflowKey"
2986
+ },
2987
+ "arguments": [],
2988
+ "directives": []
2989
+ },
2990
+ {
2991
+ "kind": "Field",
2992
+ "name": {
2993
+ "kind": "Name",
2994
+ "value": "version"
2995
+ },
2996
+ "arguments": [],
2997
+ "directives": []
2998
+ },
2999
+ {
3000
+ "kind": "Field",
3001
+ "name": {
3002
+ "kind": "Name",
3003
+ "value": "status"
3004
+ },
3005
+ "arguments": [],
3006
+ "directives": []
3007
+ },
3008
+ {
3009
+ "kind": "Field",
3010
+ "name": {
3011
+ "kind": "Name",
3012
+ "value": "source"
3013
+ },
3014
+ "arguments": [],
3015
+ "directives": []
3016
+ },
3017
+ {
3018
+ "kind": "Field",
3019
+ "name": {
3020
+ "kind": "Name",
3021
+ "value": "triggeredBy"
3022
+ },
3023
+ "arguments": [],
3024
+ "directives": []
3025
+ },
3026
+ {
3027
+ "kind": "Field",
3028
+ "name": {
3029
+ "kind": "Name",
3030
+ "value": "startedAt"
3031
+ },
3032
+ "arguments": [],
3033
+ "directives": []
3034
+ },
3035
+ {
3036
+ "kind": "Field",
3037
+ "name": {
3038
+ "kind": "Name",
3039
+ "value": "completedAt"
3040
+ },
3041
+ "arguments": [],
3042
+ "directives": []
3043
+ },
3044
+ {
3045
+ "kind": "Field",
3046
+ "name": {
3047
+ "kind": "Name",
3048
+ "value": "summary"
3049
+ },
3050
+ "arguments": [],
3051
+ "directives": [],
3052
+ "selectionSet": {
3053
+ "kind": "SelectionSet",
3054
+ "selections": [
3055
+ {
3056
+ "kind": "Field",
3057
+ "name": {
3058
+ "kind": "Name",
3059
+ "value": "total"
3060
+ },
3061
+ "arguments": [],
3062
+ "directives": []
3063
+ },
3064
+ {
3065
+ "kind": "Field",
3066
+ "name": {
3067
+ "kind": "Name",
3068
+ "value": "passed"
3069
+ },
3070
+ "arguments": [],
3071
+ "directives": []
3072
+ },
3073
+ {
3074
+ "kind": "Field",
3075
+ "name": {
3076
+ "kind": "Name",
3077
+ "value": "failed"
3078
+ },
3079
+ "arguments": [],
3080
+ "directives": []
3081
+ },
3082
+ {
3083
+ "kind": "Field",
3084
+ "name": {
3085
+ "kind": "Name",
3086
+ "value": "errored"
3087
+ },
3088
+ "arguments": [],
3089
+ "directives": []
3090
+ },
3091
+ {
3092
+ "kind": "Field",
3093
+ "name": {
3094
+ "kind": "Name",
3095
+ "value": "pending"
3096
+ },
3097
+ "arguments": [],
3098
+ "directives": []
3099
+ }
3100
+ ]
3101
+ }
3102
+ },
3103
+ {
3104
+ "kind": "Field",
3105
+ "name": {
3106
+ "kind": "Name",
3107
+ "value": "results"
3108
+ },
3109
+ "arguments": [],
3110
+ "directives": [],
3111
+ "selectionSet": {
3112
+ "kind": "SelectionSet",
3113
+ "selections": [{
3114
+ "kind": "FragmentSpread",
3115
+ "name": {
3116
+ "kind": "Name",
3117
+ "value": "WorkflowTestCaseResultFields"
3118
+ },
3119
+ "directives": []
3120
+ }]
3121
+ }
3122
+ }
3123
+ ]
3124
+ }
3125
+ }
3126
+ ]
3127
+ };
3128
+
3129
+ // src/generated/documents/wspace/WorkflowTestRunsDocument.ts
3130
+ const WorkflowTestRunsDocument = {
3131
+ "kind": "Document",
3132
+ "definitions": [
3133
+ {
3134
+ "kind": "OperationDefinition",
3135
+ "operation": "query",
3136
+ "name": {
3137
+ "kind": "Name",
3138
+ "value": "WorkflowTestRuns"
3139
+ },
3140
+ "variableDefinitions": [{
3141
+ "kind": "VariableDefinition",
3142
+ "variable": {
3143
+ "kind": "Variable",
3144
+ "name": {
3145
+ "kind": "Name",
3146
+ "value": "workflowKey"
3147
+ }
3148
+ },
3149
+ "type": {
3150
+ "kind": "NonNullType",
3151
+ "type": {
3152
+ "kind": "NamedType",
3153
+ "name": {
3154
+ "kind": "Name",
3155
+ "value": "String"
3156
+ }
3157
+ }
3158
+ },
3159
+ "directives": []
3160
+ }, {
3161
+ "kind": "VariableDefinition",
3162
+ "variable": {
3163
+ "kind": "Variable",
3164
+ "name": {
3165
+ "kind": "Name",
3166
+ "value": "limit"
3167
+ }
3168
+ },
3169
+ "type": {
3170
+ "kind": "NamedType",
3171
+ "name": {
3172
+ "kind": "Name",
3173
+ "value": "Int"
3174
+ }
3175
+ },
3176
+ "directives": []
3177
+ }],
3178
+ "directives": [],
3179
+ "selectionSet": {
3180
+ "kind": "SelectionSet",
3181
+ "selections": [{
3182
+ "kind": "Field",
3183
+ "name": {
3184
+ "kind": "Name",
3185
+ "value": "workflowTestRuns"
3186
+ },
3187
+ "arguments": [{
3188
+ "kind": "Argument",
3189
+ "name": {
3190
+ "kind": "Name",
3191
+ "value": "workflowKey"
3192
+ },
3193
+ "value": {
3194
+ "kind": "Variable",
3195
+ "name": {
3196
+ "kind": "Name",
3197
+ "value": "workflowKey"
3198
+ }
3199
+ }
3200
+ }, {
3201
+ "kind": "Argument",
3202
+ "name": {
3203
+ "kind": "Name",
3204
+ "value": "limit"
3205
+ },
3206
+ "value": {
3207
+ "kind": "Variable",
3208
+ "name": {
3209
+ "kind": "Name",
3210
+ "value": "limit"
3211
+ }
3212
+ }
3213
+ }],
3214
+ "directives": [],
3215
+ "selectionSet": {
3216
+ "kind": "SelectionSet",
3217
+ "selections": [{
3218
+ "kind": "FragmentSpread",
3219
+ "name": {
3220
+ "kind": "Name",
3221
+ "value": "WorkflowTestRunFields"
3222
+ },
3223
+ "directives": []
3224
+ }]
3225
+ }
3226
+ }]
3227
+ }
3228
+ },
3229
+ {
3230
+ "kind": "FragmentDefinition",
3231
+ "name": {
3232
+ "kind": "Name",
3233
+ "value": "WorkflowTestCaseResultFields"
3234
+ },
3235
+ "variableDefinitions": [],
3236
+ "typeCondition": {
3237
+ "kind": "NamedType",
3238
+ "name": {
3239
+ "kind": "Name",
3240
+ "value": "WorkflowTestCaseResult"
3241
+ }
3242
+ },
3243
+ "directives": [],
3244
+ "selectionSet": {
3245
+ "kind": "SelectionSet",
3246
+ "selections": [
3247
+ {
3248
+ "kind": "Field",
3249
+ "name": {
3250
+ "kind": "Name",
3251
+ "value": "caseId"
3252
+ },
3253
+ "arguments": [],
3254
+ "directives": []
3255
+ },
3256
+ {
3257
+ "kind": "Field",
3258
+ "name": {
3259
+ "kind": "Name",
3260
+ "value": "caseName"
3261
+ },
3262
+ "arguments": [],
3263
+ "directives": []
3264
+ },
3265
+ {
3266
+ "kind": "Field",
3267
+ "name": {
3268
+ "kind": "Name",
3269
+ "value": "runId"
3270
+ },
3271
+ "arguments": [],
3272
+ "directives": []
3273
+ },
3274
+ {
3275
+ "kind": "Field",
3276
+ "name": {
3277
+ "kind": "Name",
3278
+ "value": "status"
3279
+ },
3280
+ "arguments": [],
3281
+ "directives": []
3282
+ },
3283
+ {
3284
+ "kind": "Field",
3285
+ "name": {
3286
+ "kind": "Name",
3287
+ "value": "runStatus"
3288
+ },
3289
+ "arguments": [],
3290
+ "directives": []
3291
+ },
3292
+ {
3293
+ "kind": "Field",
3294
+ "name": {
3295
+ "kind": "Name",
3296
+ "value": "failures"
3297
+ },
3298
+ "arguments": [],
3299
+ "directives": [],
3300
+ "selectionSet": {
3301
+ "kind": "SelectionSet",
3302
+ "selections": [
3303
+ {
3304
+ "kind": "Field",
3305
+ "name": {
3306
+ "kind": "Name",
3307
+ "value": "nodeId"
3308
+ },
3309
+ "arguments": [],
3310
+ "directives": []
3311
+ },
3312
+ {
3313
+ "kind": "Field",
3314
+ "name": {
3315
+ "kind": "Name",
3316
+ "value": "code"
3317
+ },
3318
+ "arguments": [],
3319
+ "directives": []
3320
+ },
3321
+ {
3322
+ "kind": "Field",
3323
+ "name": {
3324
+ "kind": "Name",
3325
+ "value": "message"
3326
+ },
3327
+ "arguments": [],
3328
+ "directives": []
3329
+ }
3330
+ ]
3331
+ }
3332
+ },
3333
+ {
3334
+ "kind": "Field",
3335
+ "name": {
3336
+ "kind": "Name",
3337
+ "value": "completedAt"
3338
+ },
3339
+ "arguments": [],
3340
+ "directives": []
3341
+ }
3342
+ ]
3343
+ }
3344
+ },
3345
+ {
3346
+ "kind": "FragmentDefinition",
3347
+ "name": {
3348
+ "kind": "Name",
3349
+ "value": "WorkflowTestRunFields"
3350
+ },
3351
+ "variableDefinitions": [],
3352
+ "typeCondition": {
3353
+ "kind": "NamedType",
3354
+ "name": {
3355
+ "kind": "Name",
3356
+ "value": "WorkflowTestRun"
3357
+ }
3358
+ },
3359
+ "directives": [],
3360
+ "selectionSet": {
3361
+ "kind": "SelectionSet",
3362
+ "selections": [
3363
+ {
3364
+ "kind": "Field",
3365
+ "name": {
3366
+ "kind": "Name",
3367
+ "value": "id"
3368
+ },
3369
+ "arguments": [],
3370
+ "directives": []
3371
+ },
3372
+ {
3373
+ "kind": "Field",
3374
+ "name": {
3375
+ "kind": "Name",
3376
+ "value": "workflowKey"
3377
+ },
3378
+ "arguments": [],
3379
+ "directives": []
3380
+ },
3381
+ {
3382
+ "kind": "Field",
3383
+ "name": {
3384
+ "kind": "Name",
3385
+ "value": "version"
3386
+ },
3387
+ "arguments": [],
3388
+ "directives": []
3389
+ },
3390
+ {
3391
+ "kind": "Field",
3392
+ "name": {
3393
+ "kind": "Name",
3394
+ "value": "status"
3395
+ },
3396
+ "arguments": [],
3397
+ "directives": []
3398
+ },
3399
+ {
3400
+ "kind": "Field",
3401
+ "name": {
3402
+ "kind": "Name",
3403
+ "value": "source"
3404
+ },
3405
+ "arguments": [],
3406
+ "directives": []
3407
+ },
3408
+ {
3409
+ "kind": "Field",
3410
+ "name": {
3411
+ "kind": "Name",
3412
+ "value": "triggeredBy"
3413
+ },
3414
+ "arguments": [],
3415
+ "directives": []
3416
+ },
3417
+ {
3418
+ "kind": "Field",
3419
+ "name": {
3420
+ "kind": "Name",
3421
+ "value": "startedAt"
3422
+ },
3423
+ "arguments": [],
3424
+ "directives": []
3425
+ },
3426
+ {
3427
+ "kind": "Field",
3428
+ "name": {
3429
+ "kind": "Name",
3430
+ "value": "completedAt"
3431
+ },
3432
+ "arguments": [],
3433
+ "directives": []
3434
+ },
3435
+ {
3436
+ "kind": "Field",
3437
+ "name": {
3438
+ "kind": "Name",
3439
+ "value": "summary"
3440
+ },
3441
+ "arguments": [],
3442
+ "directives": [],
3443
+ "selectionSet": {
3444
+ "kind": "SelectionSet",
3445
+ "selections": [
3446
+ {
3447
+ "kind": "Field",
3448
+ "name": {
3449
+ "kind": "Name",
3450
+ "value": "total"
3451
+ },
3452
+ "arguments": [],
3453
+ "directives": []
3454
+ },
3455
+ {
3456
+ "kind": "Field",
3457
+ "name": {
3458
+ "kind": "Name",
3459
+ "value": "passed"
3460
+ },
3461
+ "arguments": [],
3462
+ "directives": []
3463
+ },
3464
+ {
3465
+ "kind": "Field",
3466
+ "name": {
3467
+ "kind": "Name",
3468
+ "value": "failed"
3469
+ },
3470
+ "arguments": [],
3471
+ "directives": []
3472
+ },
3473
+ {
3474
+ "kind": "Field",
3475
+ "name": {
3476
+ "kind": "Name",
3477
+ "value": "errored"
3478
+ },
3479
+ "arguments": [],
3480
+ "directives": []
3481
+ },
3482
+ {
3483
+ "kind": "Field",
3484
+ "name": {
3485
+ "kind": "Name",
3486
+ "value": "pending"
3487
+ },
3488
+ "arguments": [],
3489
+ "directives": []
3490
+ }
3491
+ ]
3492
+ }
3493
+ },
3494
+ {
3495
+ "kind": "Field",
3496
+ "name": {
3497
+ "kind": "Name",
3498
+ "value": "results"
3499
+ },
3500
+ "arguments": [],
3501
+ "directives": [],
3502
+ "selectionSet": {
3503
+ "kind": "SelectionSet",
3504
+ "selections": [{
3505
+ "kind": "FragmentSpread",
3506
+ "name": {
3507
+ "kind": "Name",
3508
+ "value": "WorkflowTestCaseResultFields"
3509
+ },
3510
+ "directives": []
3511
+ }]
3512
+ }
3513
+ }
3514
+ ]
3515
+ }
3516
+ }
3517
+ ]
3518
+ };
3519
+
3520
+ // src/builder/lib/workflow-tests.ts
3521
+ /**
3522
+ * Workflow test suites (BOFF-9960): the editable form of a saved test case,
3523
+ * its conversion to the GraphQL input, and the suite-status helpers the Tests
3524
+ * panel and "Save as test case" share.
3525
+ *
3526
+ * A person edits the JSON parts of a case as text. `draftToInput` parses and
3527
+ * checks them the way wspace-workflow-svc does (shapes, counts, the 256 KiB
3528
+ * cap) so a mistake shows next to its field instead of as a refused save. The
3529
+ * service still enforces every limit itself.
3530
+ */
3531
+ /** JSON bytes per case (trigger data, pinned outputs, mocks, expectations). */
3532
+ const MAX_CASE_JSON_BYTES = 262144;
3533
+ /** Mocks, pinned nodes and checked nodes per case. */
3534
+ const MAX_CASE_ENTRIES = 100;
3535
+ /** Name length. */
3536
+ const MAX_CASE_NAME = 200;
3537
+ function emptyTestCaseDraft() {
3538
+ return {
3539
+ name: "",
3540
+ description: "",
3541
+ enabled: true,
3542
+ expectedStatus: "COMPLETED",
3543
+ triggerNodeId: "",
3544
+ triggerData: "{}",
3545
+ pinnedOutputs: "{}",
3546
+ connectionMocks: "[]",
3547
+ expectations: "{}"
3548
+ };
3549
+ }
3550
+ function pretty(value) {
3551
+ return JSON.stringify(value, null, 2);
3552
+ }
3553
+ function isRecord(value) {
3554
+ return typeof value === "object" && value !== null && !Array.isArray(value);
3555
+ }
3556
+ /** The rules of an expectation as the wire (and the editor) spells them. */
3557
+ function wireRule(rule) {
3558
+ const wire = { operator: operatorSpec(rule.operator)?.wire ?? String(rule.operator) };
3559
+ if (rule.path) wire.path = rule.path;
3560
+ if (rule.expected !== null && rule.expected !== void 0) wire.expected = rule.expected;
3561
+ if (rule.min !== null && rule.min !== void 0) wire.min = rule.min;
3562
+ if (rule.max !== null && rule.max !== void 0) wire.max = rule.max;
3563
+ if (rule.message) wire.message = rule.message;
3564
+ return wire;
3565
+ }
3566
+ /** The editable form of a saved case. */
3567
+ function draftFromTestCase(testCase) {
3568
+ const expectations = {};
3569
+ for (const expectation of testCase.expectations) expectations[expectation.nodeId] = expectation.rules.map(wireRule);
3570
+ const mocks = testCase.connectionMocks.map((mock) => {
3571
+ const entry = { nodeId: mock.nodeId };
3572
+ if (mock.operation) entry.operation = mock.operation;
3573
+ if (mock.error) entry.error = mock.error.errorType ? {
3574
+ message: mock.error.message,
3575
+ errorType: mock.error.errorType
3576
+ } : { message: mock.error.message };
3577
+ else entry.response = mock.response ?? {};
3578
+ return entry;
3579
+ });
3580
+ return {
3581
+ name: testCase.name,
3582
+ description: testCase.description ?? "",
3583
+ enabled: testCase.enabled,
3584
+ expectedStatus: testCase.expectedStatus,
3585
+ triggerNodeId: testCase.triggerNodeId ?? "",
3586
+ triggerData: pretty(testCase.triggerData ?? {}),
3587
+ pinnedOutputs: pretty(testCase.pinnedOutputs ?? {}),
3588
+ connectionMocks: pretty(mocks),
3589
+ expectations: pretty(expectations)
3590
+ };
3591
+ }
3592
+ /**
3593
+ * The pinned outputs of the open canvas in the test-case shape, without the
3594
+ * pin metadata (`pinnedAt`, `pinnedBy`).
3595
+ */
3596
+ function pinnedOutputsFromCanvas(pinned) {
3597
+ const outputs = {};
3598
+ for (const [nodeId, entry] of Object.entries(pinned ?? {})) if (entry && isRecord(entry.data)) outputs[nodeId] = { data: entry.data };
3599
+ return outputs;
3600
+ }
3601
+ function parseJson(text, field, label) {
3602
+ const source = text.trim();
3603
+ if (source === "") return { value: void 0 };
3604
+ try {
3605
+ return { value: JSON.parse(source) };
3606
+ } catch (err) {
3607
+ return { error: {
3608
+ field,
3609
+ key: "fluidgrids.builder.workflowTests.invalidJson",
3610
+ fallback: `${label} is not valid JSON: ${err instanceof Error ? err.message : String(err)}`
3611
+ } };
3612
+ }
3613
+ }
3614
+ function fieldError(field, key, fallback) {
3615
+ return { error: {
3616
+ field,
3617
+ key: `fluidgrids.builder.workflowTests.${key}`,
3618
+ fallback
3619
+ } };
3620
+ }
3621
+ function parseTriggerData(text) {
3622
+ const parsed = parseJson(text, "triggerData", "Trigger data");
3623
+ if ("error" in parsed) return parsed;
3624
+ if (parsed.value === void 0) return { value: {} };
3625
+ if (!isRecord(parsed.value)) return fieldError("triggerData", "triggerDataShape", "Trigger data must be a JSON object.");
3626
+ return { value: parsed.value };
3627
+ }
3628
+ function parsePinnedOutputs(text) {
3629
+ const parsed = parseJson(text, "pinnedOutputs", "Pinned outputs");
3630
+ if ("error" in parsed) return parsed;
3631
+ if (parsed.value === void 0) return { value: {} };
3632
+ if (!isRecord(parsed.value)) return fieldError("pinnedOutputs", "pinnedShape", "Pinned outputs must be an object of { \"nodeId\": { \"data\": { ... } } }.");
3633
+ const entries = Object.entries(parsed.value);
3634
+ if (entries.length > 100) return fieldError("pinnedOutputs", "pinnedTooMany", `At most ${100} pinned nodes.`);
3635
+ const outputs = {};
3636
+ for (const [nodeId, entry] of entries) {
3637
+ if (!isRecord(entry) || !isRecord(entry.data)) return fieldError("pinnedOutputs", "pinnedShape", `Pinned output "${nodeId}" must be { "data": { ... } }.`);
3638
+ outputs[nodeId] = { data: entry.data };
3639
+ }
3640
+ return { value: outputs };
3641
+ }
3642
+ const ERROR_TYPES = new Set(Object.values(ErrorType));
3643
+ function isErrorType(value) {
3644
+ return ERROR_TYPES.has(value);
3645
+ }
3646
+ function parseConnectionMocks(text) {
3647
+ const parsed = parseJson(text, "connectionMocks", "Connection mocks");
3648
+ if ("error" in parsed) return parsed;
3649
+ if (parsed.value === void 0) return { value: [] };
3650
+ if (!Array.isArray(parsed.value)) return fieldError("connectionMocks", "mocksShape", "Connection mocks must be an array of { \"nodeId\", \"response\" } or { \"nodeId\", \"error\" }.");
3651
+ if (parsed.value.length > 100) return fieldError("connectionMocks", "mocksTooMany", `At most ${100} connection mocks.`);
3652
+ const mocks = [];
3653
+ for (const [index, raw] of parsed.value.entries()) {
3654
+ const at = `Mock ${index + 1}`;
3655
+ if (!isRecord(raw) || typeof raw.nodeId !== "string" || !raw.nodeId) return fieldError("connectionMocks", "mockNodeRequired", `${at} needs a "nodeId".`);
3656
+ if (raw.operation !== void 0 && raw.operation !== null && typeof raw.operation !== "string") return fieldError("connectionMocks", "mockOperationInvalid", `${at}: "operation" must be text.`);
3657
+ const hasResponse = raw.response !== void 0 && raw.response !== null;
3658
+ if (hasResponse === (raw.error !== void 0 && raw.error !== null)) return fieldError("connectionMocks", "mockResponseOrError", `${at} must set exactly one of "response" and "error".`);
3659
+ const mock = { nodeId: raw.nodeId };
3660
+ if (typeof raw.operation === "string" && raw.operation) mock.operation = raw.operation;
3661
+ if (hasResponse) mock.response = jsonScalar(raw.response);
3662
+ else {
3663
+ const error = raw.error;
3664
+ if (!isRecord(error) || typeof error.message !== "string") return fieldError("connectionMocks", "mockErrorShape", `${at}: "error" must be { "message": "...", "errorType"?: "..." }.`);
3665
+ const errorType = error.errorType;
3666
+ if (errorType !== void 0 && errorType !== null) {
3667
+ if (typeof errorType !== "string" || !isErrorType(errorType)) return fieldError("connectionMocks", "mockErrorType", `${at}: "errorType" must be one of ${[...ERROR_TYPES].join(", ")}.`);
3668
+ mock.error = {
3669
+ message: error.message,
3670
+ errorType
3671
+ };
3672
+ } else mock.error = { message: error.message };
3673
+ }
3674
+ mocks.push(mock);
3675
+ }
3676
+ return { value: mocks };
3677
+ }
3678
+ /**
3679
+ * A JSON value for a GraphQL `JSON` field. Codegen maps the scalar to an
3680
+ * object type, but the service accepts any JSON value (a rule's `expected` is
3681
+ * often a string or a number, a mock's `response` an array), so the parsed
3682
+ * value is passed through unchanged.
3683
+ */
3684
+ function jsonScalar(value) {
3685
+ return value;
3686
+ }
3687
+ /** A normalised rule as the GraphQL input (UPPER_SNAKE operator). */
3688
+ function ruleInput(rule) {
3689
+ const spec = operatorSpec(rule.operator);
3690
+ if (!spec) return [];
3691
+ const input = { operator: spec.value };
3692
+ if (rule.path !== void 0) input.path = rule.path;
3693
+ if (rule.expected !== void 0) input.expected = jsonScalar(rule.expected);
3694
+ if (rule.min !== void 0) input.min = rule.min;
3695
+ if (rule.max !== void 0) input.max = rule.max;
3696
+ if (rule.message !== void 0) input.message = rule.message;
3697
+ return [input];
3698
+ }
3699
+ function expectationEntries(value) {
3700
+ if (isRecord(value)) return Object.entries(value);
3701
+ if (Array.isArray(value)) {
3702
+ const entries = [];
3703
+ for (const item of value) {
3704
+ if (!isRecord(item)) return null;
3705
+ entries.push([item.nodeId, item.rules]);
3706
+ }
3707
+ return entries;
3708
+ }
3709
+ return null;
3710
+ }
3711
+ function parseExpectations(text) {
3712
+ const parsed = parseJson(text, "expectations", "Expectations");
3713
+ if ("error" in parsed) return parsed;
3714
+ if (parsed.value === void 0) return { value: [] };
3715
+ const entries = expectationEntries(parsed.value);
3716
+ if (!entries) return fieldError("expectations", "expectationsShape", "Expectations must be an object of { \"nodeId\": [rules] }.");
3717
+ if (entries.length > 100) return fieldError("expectations", "expectationsTooMany", `At most ${100} checked nodes.`);
3718
+ const expectations = [];
3719
+ for (const [nodeId, rules] of entries) {
3720
+ if (typeof nodeId !== "string" || !nodeId || !Array.isArray(rules)) return fieldError("expectations", "expectationsShape", "Expectations must be an object of { \"nodeId\": [rules] }.");
3721
+ const result = normaliseAssertRules(rules);
3722
+ if ("problem" in result) {
3723
+ const problem = describeAssertRuleProblem(result.problem);
3724
+ return { error: {
3725
+ field: "expectations",
3726
+ key: problem.key,
3727
+ fallback: `${nodeId}: ${problem.fallback}`
3728
+ } };
3729
+ }
3730
+ expectations.push({
3731
+ nodeId,
3732
+ rules: result.rules.flatMap(ruleInput)
3733
+ });
3734
+ }
3735
+ return { value: expectations };
3736
+ }
3737
+ /**
3738
+ * The GraphQL input for a draft, or the first problem found. Updating a case
3739
+ * replaces every field, so the whole input is always sent.
3740
+ */
3741
+ function draftToInput(draft, sortOrder) {
3742
+ const name = draft.name.trim();
3743
+ if (!name) return fieldError("name", "nameRequired", "Give the test case a name.");
3744
+ if (name.length > 200) return fieldError("name", "nameTooLong", `A name may have at most ${200} characters.`);
3745
+ const triggerData = parseTriggerData(draft.triggerData);
3746
+ if ("error" in triggerData) return triggerData;
3747
+ const pinnedOutputs = parsePinnedOutputs(draft.pinnedOutputs);
3748
+ if ("error" in pinnedOutputs) return pinnedOutputs;
3749
+ const connectionMocks = parseConnectionMocks(draft.connectionMocks);
3750
+ if ("error" in connectionMocks) return connectionMocks;
3751
+ const expectations = parseExpectations(draft.expectations);
3752
+ if ("error" in expectations) return expectations;
3753
+ const bytes = new TextEncoder().encode(JSON.stringify([
3754
+ triggerData.value,
3755
+ pinnedOutputs.value,
3756
+ connectionMocks.value,
3757
+ expectations.value
3758
+ ])).length;
3759
+ if (bytes > 262144) return fieldError("size", "tooLarge", `The case holds ${Math.ceil(bytes / 1024)} KiB of JSON; the limit is ${MAX_CASE_JSON_BYTES / 1024} KiB.`);
3760
+ const input = {
3761
+ name,
3762
+ description: draft.description.trim() || null,
3763
+ triggerNodeId: draft.triggerNodeId || null,
3764
+ triggerData: triggerData.value,
3765
+ pinnedOutputs: pinnedOutputs.value,
3766
+ connectionMocks: connectionMocks.value,
3767
+ expectedStatus: draft.expectedStatus,
3768
+ expectations: expectations.value,
3769
+ enabled: draft.enabled
3770
+ };
3771
+ if (sortOrder !== void 0) input.sortOrder = sortOrder;
3772
+ return { input };
3773
+ }
3774
+ /** Whether a suite (or a case in it) is still running. */
3775
+ function isTestRunOpen(status) {
3776
+ return status === "PENDING" || status === "RUNNING";
3777
+ }
3778
+ /** How a suite or case status is shown. */
3779
+ function testStatusTone(status) {
3780
+ switch (status) {
3781
+ case "PASSED": return "success";
3782
+ case "FAILED": return "error";
3783
+ case "ERROR": return "warning";
3784
+ default: return "pending";
3785
+ }
3786
+ }
3787
+ /** Semantic-token classes for a status tone. */
3788
+ const TEST_STATUS_TONE_CLASS = {
3789
+ success: "border-[var(--color-status-success-border)] bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
3790
+ error: "border-[var(--color-status-error-border)] bg-[var(--color-status-error-bg-subtle)] text-[var(--color-status-error-text)]",
3791
+ warning: "border-[var(--color-status-warning-border)] bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
3792
+ pending: "border-border bg-muted text-muted-foreground"
3793
+ };
3794
+ /** The i18n key and English label of a suite or case status. */
3795
+ function testStatusLabel(status) {
3796
+ const fallback = {
3797
+ ["PENDING"]: "Pending",
3798
+ ["RUNNING"]: "Running",
3799
+ ["PASSED"]: "Passed",
3800
+ ["FAILED"]: "Failed",
3801
+ ["ERROR"]: "Error"
3802
+ };
3803
+ return {
3804
+ key: `fluidgrids.builder.workflowTests.status.${status.toLowerCase()}`,
3805
+ fallback: fallback[status]
3806
+ };
3807
+ }
3808
+ /** "3 passed · 1 failed · 1 running" for a suite run. */
3809
+ function testRunSummaryText(summary) {
3810
+ const parts = [`${summary.passed} passed`];
3811
+ if (summary.failed) parts.push(`${summary.failed} failed`);
3812
+ if (summary.errored) parts.push(`${summary.errored} errored`);
3813
+ if (summary.pending) parts.push(`${summary.pending} running`);
3814
+ return `${parts.join(" · ")} of ${summary.total}`;
3815
+ }
3816
+ /** The ids of the enabled cases, in their order. */
3817
+ function enabledCaseIds(cases) {
3818
+ return cases.filter((testCase) => testCase.enabled).map((c) => c.id);
3819
+ }
3820
+ /** The sort order a new case takes: after every existing case. */
3821
+ function nextSortOrder(cases) {
3822
+ return cases.reduce((max, c) => Math.max(max, c.sortOrder + 1), 0);
3823
+ }
3824
+ /** Run statuses after which a run can be saved as a test case. */
3825
+ const SAVEABLE_RUN_STATUSES = /* @__PURE__ */ new Set(["COMPLETED", "FAILED"]);
3826
+ /** Whether a finished run of a canvas workflow can become a test case. */
3827
+ function canSaveRunAsTestCase(run) {
3828
+ return SAVEABLE_RUN_STATUSES.has(run.status) && !!run.workflowKey && !run.isDurable;
3829
+ }
3830
+
3831
+ // src/builder/hooks/use-workflow-tests.ts
3832
+ /**
3833
+ * useWorkflowTests — the saved test cases of one workflow, its recent suite
3834
+ * runs and the actions on them (BOFF-9960).
3835
+ *
3836
+ * Every write refetches what it changed, so the panel shows what the server
3837
+ * holds. While a suite run is open (PENDING or RUNNING) it is polled with
3838
+ * `workflowTestRun` until it settles; the cases are then read again for their
3839
+ * last result. Nothing is sent while `enabled` is false (the
3840
+ * `fluidgrids.workflow-tests` flag off), so a workspace without the feature
3841
+ * never meets its FEATURE_DISABLED refusals.
3842
+ */
3843
+ /** How often an open suite run is read again. */
3844
+ const TEST_RUN_POLL_INTERVAL_MS = 2e3;
3845
+ /** Suite runs listed in the panel. */
3846
+ const TEST_RUN_HISTORY_LIMIT = 10;
3847
+ function messageOf(error) {
3848
+ return error instanceof Error ? error.message : String(error);
3849
+ }
3850
+ /** Puts a run first in the list, replacing an older copy of it. */
3851
+ function upsertRun(runs, run) {
3852
+ return [run, ...runs.filter((item) => item.id !== run.id)].slice(0, 10);
3853
+ }
3854
+ function useWorkflowTests(workflowKey, enabled) {
3855
+ const [cases, setCases] = useState([]);
3856
+ const [runs, setRuns] = useState([]);
3857
+ const [activeRunId, setActiveRunId] = useState(null);
3858
+ const [loading, setLoading] = useState(false);
3859
+ const [error, setError] = useState(null);
3860
+ const [forbidden, setForbidden] = useState(false);
3861
+ const [pollTick, setPollTick] = useState(0);
3862
+ const keyRef = useRef(workflowKey);
3863
+ const refetch = useCallback(async () => {
3864
+ if (!enabled || !workflowKey) return;
3865
+ setLoading(true);
3866
+ setError(null);
3867
+ try {
3868
+ const client = getFluidGridsClient();
3869
+ const [caseResult, runResult] = await Promise.all([client.query({
3870
+ query: WorkflowTestCasesDocument,
3871
+ variables: { workflowKey },
3872
+ fetchPolicy: "network-only"
3873
+ }), client.query({
3874
+ query: WorkflowTestRunsDocument,
3875
+ variables: {
3876
+ workflowKey,
3877
+ limit: 10
3878
+ },
3879
+ fetchPolicy: "network-only"
3880
+ })]);
3881
+ throwIfResultError(caseResult);
3882
+ throwIfResultError(runResult);
3883
+ if (keyRef.current !== workflowKey) return;
3884
+ setCases(caseResult.data?.workflowTestCases ?? []);
3885
+ setRuns(runResult.data?.workflowTestRuns ?? []);
3886
+ setForbidden(false);
3887
+ } catch (err) {
3888
+ if (keyRef.current !== workflowKey) return;
3889
+ if (isForbiddenError(err)) setForbidden(true);
3890
+ else setError(messageOf(err));
3891
+ } finally {
3892
+ if (keyRef.current === workflowKey) setLoading(false);
3893
+ }
3894
+ }, [enabled, workflowKey]);
3895
+ useEffect(() => {
3896
+ keyRef.current = workflowKey;
3897
+ setCases([]);
3898
+ setRuns([]);
3899
+ setActiveRunId(null);
3900
+ setForbidden(false);
3901
+ setError(null);
3902
+ }, [workflowKey]);
3903
+ const activeRun = (activeRunId ? runs.find((run) => run.id === activeRunId) : runs[0]) ?? null;
3904
+ const followedId = activeRun && isTestRunOpen(activeRun.status) ? activeRun.id : null;
3905
+ useEffect(() => {
3906
+ if (!enabled || !followedId) return;
3907
+ let cancelled = false;
3908
+ const key = workflowKey;
3909
+ const timer = setTimeout(() => {
3910
+ (async () => {
3911
+ try {
3912
+ const result = await getFluidGridsClient().query({
3913
+ query: WorkflowTestRunDocument,
3914
+ variables: { id: followedId },
3915
+ fetchPolicy: "network-only"
3916
+ });
3917
+ throwIfResultError(result);
3918
+ const run = result.data?.workflowTestRun;
3919
+ if (cancelled || keyRef.current !== key || !run) return;
3920
+ setRuns((current) => upsertRun(current, run));
3921
+ if (!isTestRunOpen(run.status)) await refetchCases(key);
3922
+ } catch (err) {
3923
+ if (!cancelled && keyRef.current === key) setError(messageOf(err));
3924
+ } finally {
3925
+ if (!cancelled) setPollTick((tick) => tick + 1);
3926
+ }
3927
+ })();
3928
+ }, TEST_RUN_POLL_INTERVAL_MS);
3929
+ async function refetchCases(forKey) {
3930
+ const result = await getFluidGridsClient().query({
3931
+ query: WorkflowTestCasesDocument,
3932
+ variables: { workflowKey: forKey },
3933
+ fetchPolicy: "network-only"
3934
+ });
3935
+ throwIfResultError(result);
3936
+ if (!cancelled && keyRef.current === forKey) setCases(result.data?.workflowTestCases ?? []);
3937
+ }
3938
+ return () => {
3939
+ cancelled = true;
3940
+ clearTimeout(timer);
3941
+ };
3942
+ }, [
3943
+ enabled,
3944
+ followedId,
3945
+ workflowKey,
3946
+ pollTick
3947
+ ]);
3948
+ return {
3949
+ cases,
3950
+ runs,
3951
+ activeRun,
3952
+ loading,
3953
+ error,
3954
+ forbidden,
3955
+ refetch,
3956
+ createCase: useCallback(async (input) => {
3957
+ const result = await getFluidGridsClient().mutate({
3958
+ mutation: CreateWorkflowTestCaseDocument,
3959
+ variables: {
3960
+ workflowKey,
3961
+ input
3962
+ }
3963
+ });
3964
+ throwIfResultError(result);
3965
+ const created = result.data?.createWorkflowTestCase;
3966
+ if (!created) throw new Error("The test case was not saved.");
3967
+ await refetch();
3968
+ return created;
3969
+ }, [workflowKey, refetch]),
3970
+ updateCase: useCallback(async (id, input) => {
3971
+ const result = await getFluidGridsClient().mutate({
3972
+ mutation: UpdateWorkflowTestCaseDocument,
3973
+ variables: {
3974
+ id,
3975
+ input
3976
+ }
3977
+ });
3978
+ throwIfResultError(result);
3979
+ const updated = result.data?.updateWorkflowTestCase;
3980
+ if (!updated) throw new Error("The test case was not saved.");
3981
+ await refetch();
3982
+ return updated;
3983
+ }, [refetch]),
3984
+ deleteCase: useCallback(async (id) => {
3985
+ const result = await getFluidGridsClient().mutate({
3986
+ mutation: DeleteWorkflowTestCaseDocument,
3987
+ variables: { id }
3988
+ });
3989
+ throwIfResultError(result);
3990
+ await refetch();
3991
+ }, [refetch]),
3992
+ runTests: useCallback(async (options = {}) => {
3993
+ const result = await getFluidGridsClient().mutate({
3994
+ mutation: RunWorkflowTestsDocument,
3995
+ variables: { input: {
3996
+ workflowKey,
3997
+ source: "UI",
3998
+ ...options.version ? { version: options.version } : {},
3999
+ ...options.caseIds ? { caseIds: options.caseIds } : {}
4000
+ } }
4001
+ });
4002
+ throwIfResultError(result);
4003
+ const run = result.data?.runWorkflowTests;
4004
+ if (!run) throw new Error("The test run did not start.");
4005
+ setRuns((current) => upsertRun(current, run));
4006
+ setActiveRunId(run.id);
4007
+ return run;
4008
+ }, [workflowKey])
4009
+ };
4010
+ }
4011
+ /**
4012
+ * Saves a finished run as a test case of its workflow (used by the run detail
4013
+ * page, outside the builder).
4014
+ */
4015
+ async function saveRunAsTestCase(runId, name, description) {
4016
+ const result = await getFluidGridsClient().mutate({
4017
+ mutation: CreateWorkflowTestCaseFromRunDocument,
4018
+ variables: {
4019
+ runId,
4020
+ name,
4021
+ ...description ? { description } : {}
4022
+ }
4023
+ });
4024
+ throwIfResultError(result);
4025
+ const created = result.data?.createWorkflowTestCaseFromRun;
4026
+ if (!created) throw new Error("The test case was not saved.");
4027
+ return created;
4028
+ }
4029
+
4030
+ // src/modules/executions/utils/agent-token-stream.ts
4031
+ /** Longest reply kept per iteration; the PLAN step holds the full text. */
4032
+ const AGENT_TOKEN_STREAM_MAX_CHARS = 2e5;
4033
+ /** The key of one model turn: node execution and iteration. */
4034
+ function agentTokenStreamKey(delta) {
4035
+ return `${delta.nodeId}|${delta.nodeStateId ?? ""}|${delta.iteration}`;
4036
+ }
4037
+ function capped(text) {
4038
+ return text.length > 2e5 ? {
4039
+ text: text.slice(0, AGENT_TOKEN_STREAM_MAX_CHARS),
4040
+ truncated: true
4041
+ } : {
4042
+ text,
4043
+ truncated: false
4044
+ };
4045
+ }
4046
+ function isDelta(value) {
4047
+ if (typeof value !== "object" || value === null) return false;
4048
+ const delta = value;
4049
+ return typeof delta.nodeId === "string" && typeof delta.iteration === "number" && Number.isInteger(delta.iteration) && delta.iteration >= 0 && typeof delta.offset === "number" && Number.isInteger(delta.offset) && delta.offset >= 0 && typeof delta.delta === "string";
4050
+ }
4051
+ /** The text of a stream after one delta (see the module comment). */
4052
+ function applyText(current, delta) {
4053
+ const before = current?.text ?? "";
4054
+ if (delta.reset) return {
4055
+ text: delta.delta,
4056
+ gap: delta.offset > 0
4057
+ };
4058
+ if (delta.offset === before.length) return {
4059
+ text: before + delta.delta,
4060
+ gap: current?.gap ?? false
4061
+ };
4062
+ if (delta.offset < before.length) return {
4063
+ text: before.slice(0, delta.offset) + delta.delta,
4064
+ gap: current?.gap ?? false
4065
+ };
4066
+ return {
4067
+ text: before + delta.delta,
4068
+ gap: true
4069
+ };
4070
+ }
4071
+ /**
4072
+ * `current` with a batch of deltas applied, in order. Returns `current` itself
4073
+ * when nothing in the batch was usable, so callers can skip a re-render.
4074
+ */
4075
+ function applyAgentTokenDeltas(current, deltas, now = Date.now()) {
4076
+ let next = null;
4077
+ for (const raw of deltas) {
4078
+ if (!isDelta(raw)) continue;
4079
+ const nodeStateId = raw.nodeStateId ?? null;
4080
+ const key = agentTokenStreamKey({
4081
+ ...raw,
4082
+ nodeStateId
4083
+ });
4084
+ const held = (next ?? current).get(key);
4085
+ if (held?.done && !raw.reset) continue;
4086
+ next ??= new Map(current);
4087
+ const { text, gap } = applyText(held, raw);
4088
+ const limited = capped(text);
4089
+ next.set(key, {
4090
+ key,
4091
+ runId: raw.runId,
4092
+ nodeId: raw.nodeId,
4093
+ nodeStateId,
4094
+ iteration: raw.iteration,
4095
+ text: limited.text,
4096
+ done: raw.done === true,
4097
+ error: typeof raw.error === "string" && raw.error.length > 0 ? raw.error : null,
4098
+ gap,
4099
+ truncated: limited.truncated || (held?.truncated ?? false),
4100
+ order: held?.order ?? next.size,
4101
+ updatedAt: now
4102
+ });
4103
+ }
4104
+ return next ?? current;
4105
+ }
4106
+ /** The streams in the order they started (node execution, then iteration). */
4107
+ function sortedAgentTokenStreams(streams) {
4108
+ return [...streams.values()].sort((a, b) => a.order - b.order);
4109
+ }
4110
+ /** The streams of one AI Agent node execution, by iteration. */
4111
+ function agentTokenStreamsFor(streams, nodeStateId, nodeId) {
4112
+ return streams.filter((stream) => nodeStateId !== null && stream.nodeStateId !== null ? stream.nodeStateId === nodeStateId : stream.nodeId === nodeId).sort((a, b) => a.iteration - b.iteration);
4113
+ }
4114
+ /**
4115
+ * The state of a stream for the reader: a failed call, a finished one, one
4116
+ * still being written, or one the run stopped writing (cancelled, or the
4117
+ * worker went away) before the turn ended.
4118
+ */
4119
+ function agentLiveReplyState(stream, runLive) {
4120
+ if (stream.error) return "failed";
4121
+ if (stream.done) return "done";
4122
+ return runLive ? "streaming" : "stopped";
4123
+ }
4124
+ /**
4125
+ * The stream the builder's chat shows: the newest turn of the newest node
4126
+ * execution of an AI Agent node (`agentNodeIds`), or of any node when that set
4127
+ * is empty.
4128
+ */
4129
+ function latestAgentTokenStream(streams, agentNodeIds) {
4130
+ let latest = null;
4131
+ for (const stream of streams.values()) {
4132
+ if (agentNodeIds && agentNodeIds.size > 0) {
4133
+ if (!agentNodeIds.has(stream.nodeId)) continue;
4134
+ }
4135
+ if (!latest || stream.order > latest.order) latest = stream;
4136
+ }
4137
+ return latest;
4138
+ }
4139
+
4140
+ // src/modules/executions/hooks/useAgentTokenStream.ts
4141
+ /**
4142
+ * useAgentTokenStream — a run's AI Agent model replies while the model is
4143
+ * still writing them (BOFF-9938), for the run page's Agent tab and the
4144
+ * builder's chat panel.
4145
+ *
4146
+ * Subscribes to `agentTokenDelta(runId)` while `enabled`, and folds every
4147
+ * batch into one stream per model turn (node execution and iteration, see
4148
+ * `agent-token-stream.ts`). The stream carries no history: a turn that started
4149
+ * before the subscription opened shows only what arrives after. Turning
4150
+ * `enabled` off closes the subscription but keeps the streams already held,
4151
+ * so a reader can keep showing them until the step trace has the final text.
4152
+ * A different `runId` starts from nothing.
4153
+ */
4154
+ const EMPTY_STREAMS = /* @__PURE__ */ new Map();
4155
+ /**
4156
+ * Follow a run's model replies: subscribe to `agentTokenDelta` and hand each
4157
+ * non-empty batch to `onDeltas`. Returns the function that closes the
4158
+ * subscription; nothing is called back after it ran. A failed or ended
4159
+ * subscription only reports `onStreaming(false)`: the step trace and the node
4160
+ * output still carry every reply, so the stream is an accelerator.
4161
+ */
4162
+ function followAgentTokenDeltas(client, runId, { onDeltas, onStreaming }) {
4163
+ let stopped = false;
4164
+ const subscription = client.subscribe({
4165
+ query: AgentTokenDeltaDocument,
4166
+ variables: { runId }
4167
+ }).subscribe({
4168
+ next: ({ data }) => {
4169
+ if (stopped) return;
4170
+ onStreaming(true);
4171
+ const deltas = data?.agentTokenDelta ?? [];
4172
+ if (deltas.length > 0) onDeltas(deltas, Date.now());
4173
+ },
4174
+ error: () => {
4175
+ if (!stopped) onStreaming(false);
4176
+ },
4177
+ complete: () => {
4178
+ if (!stopped) onStreaming(false);
4179
+ }
4180
+ });
4181
+ return () => {
4182
+ stopped = true;
4183
+ subscription.unsubscribe();
4184
+ onStreaming(false);
4185
+ };
4186
+ }
4187
+ function useAgentTokenStream(runId, { enabled }) {
4188
+ const [state, setState] = useState(null);
4189
+ const [streaming, setStreaming] = useState(false);
4190
+ useEffect(() => {
4191
+ const client = getFluidGridsClientSafe();
4192
+ if (!runId || !enabled || !client) return void 0;
4193
+ return followAgentTokenDeltas(client, runId, {
4194
+ onStreaming: setStreaming,
4195
+ onDeltas: (deltas, receivedAt) => setState((previous) => {
4196
+ const held = previous?.runId === runId ? previous.streams : EMPTY_STREAMS;
4197
+ const streams = applyAgentTokenDeltas(held, deltas, receivedAt);
4198
+ if (streams === held && previous?.runId === runId) return previous;
4199
+ return {
4200
+ runId,
4201
+ streams,
4202
+ lastDeltaAt: receivedAt
4203
+ };
4204
+ })
4205
+ });
4206
+ }, [runId, enabled]);
4207
+ const current = runId && state?.runId === runId ? state : null;
4208
+ const byKey = current?.streams ?? EMPTY_STREAMS;
4209
+ return {
4210
+ streams: useMemo(() => sortedAgentTokenStreams(byKey), [byKey]),
4211
+ byKey,
4212
+ streaming: enabled && !!runId && streaming,
4213
+ lastDeltaAt: current?.lastDeltaAt ?? null
4214
+ };
4215
+ }
4216
+
4217
+ export { RunWorkflowTestsDocument as C, CreateWorkflowTestCaseDocument as D, UpdateWorkflowTestCaseDocument as E, AgentTokenDeltaDocument as O, WorkflowTestCasesDocument as S, DeleteWorkflowTestCaseDocument as T, testRunSummaryText as _, latestAgentTokenStream as a, WorkflowTestRunsDocument as b, TEST_STATUS_TONE_CLASS as c, draftToInput as d, emptyTestCaseDraft as f, pinnedOutputsFromCanvas as g, nextSortOrder as h, applyAgentTokenDeltas as i, canSaveRunAsTestCase as l, isTestRunOpen as m, agentLiveReplyState as n, saveRunAsTestCase as o, enabledCaseIds as p, agentTokenStreamsFor as r, useWorkflowTests as s, useAgentTokenStream as t, draftFromTestCase as u, testStatusLabel as v, CreateWorkflowTestCaseFromRunDocument as w, WorkflowTestRunDocument as x, testStatusTone as y };