From 0b86813b6c85c3c013ad5ee993cf8f37ba9cdf6b Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Mon, 23 Mar 2026 11:47:27 +0530 Subject: [PATCH] chore: fix API schema for workflow --- api/routes/workflow.py | 6 +++++- ui/src/client/types.gen.ts | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/api/routes/workflow.py b/api/routes/workflow.py index 87cfe8a..8d15743 100644 --- a/api/routes/workflow.py +++ b/api/routes/workflow.py @@ -89,6 +89,10 @@ class ValidateWorkflowResponse(BaseModel): errors: list[WorkflowError] +class CallDispositionCodes(BaseModel): + disposition_codes: list[str] = [] + + class WorkflowResponse(BaseModel): id: int name: str @@ -97,7 +101,7 @@ class WorkflowResponse(BaseModel): workflow_definition: dict current_definition_id: int | None template_context_variables: dict | None = None - call_disposition_codes: dict | None = None + call_disposition_codes: CallDispositionCodes | None = None total_runs: int | None = None workflow_configurations: dict | None = None diff --git a/ui/src/client/types.gen.ts b/ui/src/client/types.gen.ts index b8cad0e..7cc8aba 100644 --- a/ui/src/client/types.gen.ts +++ b/ui/src/client/types.gen.ts @@ -80,6 +80,10 @@ export type AuthUserResponse = { is_superuser: boolean; }; +export type CallDispositionCodes = { + disposition_codes?: Array; +}; + export type CallType = 'inbound' | 'outbound'; export type CampaignDefaultsResponse = { @@ -1447,9 +1451,7 @@ export type WorkflowResponse = { template_context_variables?: { [key: string]: unknown; } | null; - call_disposition_codes?: { - [key: string]: unknown; - } | null; + call_disposition_codes?: CallDispositionCodes | null; total_runs?: number | null; workflow_configurations?: { [key: string]: unknown;