feat: expose workflow output bindings over rpc

This commit is contained in:
lda
2026-07-26 21:15:53 +07:00 Verified
parent 7930f8575b
commit 22177f95a1
8 changed files with 189 additions and 1 deletions
@@ -35,6 +35,7 @@ from ..models import (
SetStepInputMapParams,
SetStepOutputBindingsParams,
SetStepOutputMapParams,
SetWorkflowOutputBindingsParams,
SetWorkflowOutputMapParams,
ValidateDraftParams,
ValidateDraftWorkspaceParams,
@@ -297,6 +298,22 @@ def register_methods(
except (ValueError, KeyError, LookupError, FileNotFoundError) as exc:
raise_workflow_rpc_error(exc)
@entrypoint.method(
name="workflow.draft_workspaces.set_workflow_output_bindings",
errors=[WorkflowRpcError],
)
async def workflow_draft_workspaces_set_workflow_output_bindings(
params: SetWorkflowOutputBindingsParams = RpcParams(),
) -> dict[str, Any]:
try:
return await server.api.set_workflow_output_bindings(
workspace_id=params.workspace_id,
revision=params.revision,
bindings=params.bindings,
)
except (ValueError, KeyError, LookupError, FileNotFoundError) as exc:
raise_workflow_rpc_error(exc)
@entrypoint.method(
name="workflow.draft_workspaces.bind",
errors=[WorkflowRpcError],