fix(backend): update conversation and schedule center schemas
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
from pydantic import BaseModel
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from typing import Literal
|
||||||
|
|
||||||
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
|
||||||
class MessageCreate(BaseModel):
|
class MessageCreate(BaseModel):
|
||||||
@@ -37,6 +39,7 @@ class ChatRequest(BaseModel):
|
|||||||
conversation_id: str | None = None
|
conversation_id: str | None = None
|
||||||
agent_id: str | None = None
|
agent_id: str | None = None
|
||||||
model_name: str | None = None
|
model_name: str | None = None
|
||||||
|
runtime: Literal["jarvis", "hermes"] | None = None
|
||||||
file_ids: list[str] = []
|
file_ids: list[str] = []
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
from app.models.task import TaskDispatchStatus, TaskPriority, TaskQuadrant, TaskStatus
|
||||||
from app.schemas.goal import GoalOut
|
from app.schemas.goal import GoalOut
|
||||||
from app.schemas.reminder import ReminderOut
|
from app.schemas.reminder import ReminderOut
|
||||||
from app.schemas.task import TaskOut
|
from app.schemas.task import TaskOut
|
||||||
@@ -18,6 +19,47 @@ class ScheduleCenterDaySummary(BaseModel):
|
|||||||
goal_total: int
|
goal_total: int
|
||||||
|
|
||||||
|
|
||||||
|
class ScheduleCenterFocusTaskOut(BaseModel):
|
||||||
|
id: str
|
||||||
|
title: str
|
||||||
|
status: TaskStatus
|
||||||
|
priority: TaskPriority
|
||||||
|
quadrant: TaskQuadrant | None = None
|
||||||
|
assignee_type: str | None = None
|
||||||
|
assignee_id: str | None = None
|
||||||
|
dispatch_status: TaskDispatchStatus
|
||||||
|
due_date: datetime | None = None
|
||||||
|
|
||||||
|
|
||||||
|
class ScheduleCenterQuadrantTaskOut(BaseModel):
|
||||||
|
id: str
|
||||||
|
title: str
|
||||||
|
status: TaskStatus
|
||||||
|
priority: TaskPriority
|
||||||
|
dispatch_status: TaskDispatchStatus
|
||||||
|
assignee_type: str | None = None
|
||||||
|
assignee_id: str | None = None
|
||||||
|
|
||||||
|
|
||||||
|
class ScheduleCenterQuadrantOut(BaseModel):
|
||||||
|
id: TaskQuadrant
|
||||||
|
title: str
|
||||||
|
subtitle: str
|
||||||
|
color: str
|
||||||
|
glow_color: str
|
||||||
|
icon: str
|
||||||
|
tasks: list[ScheduleCenterQuadrantTaskOut] = Field(default_factory=list)
|
||||||
|
|
||||||
|
|
||||||
|
class ScheduleCenterCommanderSummaryOut(BaseModel):
|
||||||
|
total: int = 0
|
||||||
|
queued: int = 0
|
||||||
|
running: int = 0
|
||||||
|
completed: int = 0
|
||||||
|
failed: int = 0
|
||||||
|
overall_status: str | None = None
|
||||||
|
|
||||||
|
|
||||||
class ScheduleCenterMonthOut(BaseModel):
|
class ScheduleCenterMonthOut(BaseModel):
|
||||||
month: str
|
month: str
|
||||||
days: list[ScheduleCenterDaySummary]
|
days: list[ScheduleCenterDaySummary]
|
||||||
@@ -30,4 +72,9 @@ class ScheduleCenterDateOut(BaseModel):
|
|||||||
reminders: list[ReminderOut]
|
reminders: list[ReminderOut]
|
||||||
goals: list[GoalOut]
|
goals: list[GoalOut]
|
||||||
summary: ScheduleCenterDaySummary
|
summary: ScheduleCenterDaySummary
|
||||||
|
focus_tasks: list[ScheduleCenterFocusTaskOut] = Field(default_factory=list)
|
||||||
|
quadrants: list[ScheduleCenterQuadrantOut] = Field(default_factory=list)
|
||||||
|
commander_summary: ScheduleCenterCommanderSummaryOut = Field(
|
||||||
|
default_factory=ScheduleCenterCommanderSummaryOut,
|
||||||
|
)
|
||||||
generated_at: datetime
|
generated_at: datetime
|
||||||
|
|||||||
Reference in New Issue
Block a user