Add reconciliation state-change API contract

This commit is contained in:
2026-05-23 17:22:12 +02:00
parent 4d62768a3a
commit add650d4fa
5 changed files with 219 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
import uuid
from typing import Literal
from pydantic import BaseModel
from api.services.reconciliation import ReconciliationClass
TargetType = Literal["workstream", "task"]
class StateChangeRequest(BaseModel):
target_type: TargetType
target_id: uuid.UUID
target_status: str
actor: str = "dashboard"
intent: str | None = None
file_backed: bool | None = None
archived_file: bool | None = None
task_linked: bool | None = None
tasks_terminal: bool | None = None
blocking_reason: str | None = None
class StateChangeResponse(BaseModel):
target_type: TargetType
target_id: uuid.UUID
actor: str
intent: str | None = None
current_status: str
target_status: str
file_backed: bool
archived_file: bool
task_linked: bool | None = None
tasks_terminal: bool | None = None
reconciliation_class: ReconciliationClass
reason: str
follow_up: str
write_through_result: Literal["not_attempted"] = "not_attempted"