diff --git a/skyvern-frontend/src/api/types.ts b/skyvern-frontend/src/api/types.ts index 234af7b3..760a0817 100644 --- a/skyvern-frontend/src/api/types.ts +++ b/skyvern-frontend/src/api/types.ts @@ -236,16 +236,41 @@ export type Action = { index: number; }; +export type EvalKind = "workflow" | "task"; + +export interface Eval { + kind: EvalKind; + created_at: string; + organization_id: string; + status: Status; + title: string | null; + workflow_permanent_id: string | null; + workflow_run_id: string | null; +} + +export interface EvalWorkflow extends Eval { + kind: "workflow"; +} + +export interface EvalTask extends Eval { + kind: "task"; + task_id: string; + url: string | null; +} + +export type EvalApiResponse = EvalWorkflow[] | EvalTask[]; + export type WorkflowRunApiResponse = { + created_at: string; + failure_reason: string | null; + modified_at: string; + proxy_location: ProxyLocation | null; + status: Status; + title?: string; + webhook_callback_url: string; + workflow_id: string; workflow_permanent_id: string; workflow_run_id: string; - workflow_id: string; - status: Status; - proxy_location: ProxyLocation | null; - webhook_callback_url: string; - created_at: string; - modified_at: string; - failure_reason: string | null; workflow_title: string | null; }; diff --git a/skyvern-frontend/src/components/SwitchBar.tsx b/skyvern-frontend/src/components/SwitchBar.tsx index c24d83a6..b3c21685 100644 --- a/skyvern-frontend/src/components/SwitchBar.tsx +++ b/skyvern-frontend/src/components/SwitchBar.tsx @@ -6,21 +6,27 @@ type Option = { }; type Props = { + className?: string; options: Option[]; value: string; onChange: (value: string) => void; }; -function SwitchBar({ options, value, onChange }: Props) { +function SwitchBar({ className, options, value, onChange }: Props) { return ( -