feat: expose workflow output bindings over rpc
This commit is contained in:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user