feat: add workflow output draft command

This commit is contained in:
lda
2026-06-29 02:06:47 +07:00 Verified
parent 001c802a21
commit fe63eb08d4
25 changed files with 499 additions and 51 deletions
@@ -28,6 +28,7 @@ from ..models import (
SetDraftRouteParams,
SetStepInputMapParams,
SetStepOutputMapParams,
SetWorkflowOutputMapParams,
ValidateDraftParams,
ValidateDraftWorkspaceParams,
)
@@ -185,6 +186,23 @@ def register_methods(
except (ValueError, KeyError, LookupError, FileNotFoundError) as exc:
raise_workflow_rpc_error(exc)
@entrypoint.method(
name="workflow.draft_workspaces.set_workflow_output_map",
errors=[WorkflowRpcError],
)
async def workflow_draft_workspaces_set_workflow_output_map(
params: SetWorkflowOutputMapParams = RpcParams(),
) -> dict[str, Any]:
try:
return await server.api.set_workflow_output_map(
workspace_id=params.workspace_id,
revision=params.revision,
output_map=params.output_map,
merge=params.merge,
)
except (ValueError, KeyError, LookupError, FileNotFoundError) as exc:
raise_workflow_rpc_error(exc)
@entrypoint.method(
name="workflow.draft_workspaces.bind",
errors=[WorkflowRpcError],