generated from coulomb/repo-seed
Add reconciliation state-change API contract
This commit is contained in:
39
api/schemas/reconciliation.py
Normal file
39
api/schemas/reconciliation.py
Normal 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"
|
||||
Reference in New Issue
Block a user