from __future__ import annotations from enum import Enum from typing import Any from pydantic import BaseModel, Field class TaskCategory(str, Enum): FULLY_AUTOMATABLE = "fully_automatable" AI_ASSISTED = "ai_assisted" MANUAL = "manual" class AnalyzeRequest(BaseModel): owner_id: str owner_email: str description: str class CustomTaskRequest(BaseModel): owner_id: str custom_task: str class WorkflowSuggestionRequest(BaseModel): owner_id: str task_name: str task_description: str category: str class WorkflowStep(BaseModel): id: str action: str params: dict[str, Any] on_error: str class WorkflowDefinition(BaseModel): name: str description: str trigger: dict[str, Any] steps: list[WorkflowStep] class BuildWorkflowRequest(BaseModel): owner_id: str task_name: str task_description: str category: str selected_option: dict[str, Any] class BuildWorkflowResponse(BaseModel): workflow: dict[str, Any] class DeployRequest(BaseModel): owner_id: str workflows: list[WorkflowDefinition] class DeploymentResponse(BaseModel): status: str workflows: list[dict[str, Any]] message: str class StopAutomationRequest(BaseModel): owner_id: str class StopAutomationResponse(BaseModel): status: str workflows: list[dict[str, Any]] message: str class FileUploadRequest(BaseModel): owner_id: str filename: str file_type: str purpose: str content: str class FileUploadResponse(BaseModel): file: dict[str, Any] class OwnerStatusResponse(BaseModel): owner: dict[str, Any] workflows: list[dict[str, Any]] recent_executions: list[dict[str, Any]] class EscalationReplyRequest(BaseModel): escalation_id: str response: str class EscalationResponse(BaseModel): escalation: dict[str, Any]