feat(backend): add editor context, draft flow bootstrap, and draft summary endpoints
add backend endpoints for editor context and draft summaries ensure draft flow bootstrap for editor-driven workflows improve draft-aware initialization and summary reads for clients
This commit is contained in:
@@ -56,6 +56,30 @@ class DraftStructureResponse(BaseModel):
|
||||
total_groups: int
|
||||
|
||||
|
||||
class EditorContextResponse(BaseModel):
|
||||
scheme_id: str
|
||||
current_scheme_version_id: str
|
||||
current_version_number: int
|
||||
scheme_status: str
|
||||
scheme_version_status: str
|
||||
editor_available: bool
|
||||
current_is_draft: bool
|
||||
create_draft_available: bool
|
||||
recommended_action: str
|
||||
|
||||
|
||||
class DraftSummaryResponse(BaseModel):
|
||||
scheme_id: str
|
||||
scheme_version_id: str
|
||||
status: str
|
||||
total_seats: int
|
||||
total_sectors: int
|
||||
total_groups: int
|
||||
validation_summary: dict
|
||||
structure_diff_summary: dict
|
||||
publish_readiness: dict
|
||||
|
||||
|
||||
class SeatPatchRequest(BaseModel):
|
||||
seat_id: str | None = Field(default=None, max_length=128)
|
||||
sector_id: str | None = Field(default=None, max_length=128)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
@@ -17,7 +15,7 @@ class SchemeVersionListItem(BaseModel):
|
||||
|
||||
|
||||
class SchemeVersionListResponse(BaseModel):
|
||||
items: List[SchemeVersionListItem]
|
||||
items: list[SchemeVersionListItem]
|
||||
total: int
|
||||
|
||||
|
||||
@@ -27,3 +25,13 @@ class SchemeVersionCreateResponse(BaseModel):
|
||||
version_number: int
|
||||
status: str
|
||||
normalized_storage_path: str
|
||||
|
||||
|
||||
class EnsureDraftResponse(BaseModel):
|
||||
scheme_id: str
|
||||
scheme_version_id: str
|
||||
version_number: int
|
||||
status: str
|
||||
normalized_storage_path: str
|
||||
created: bool
|
||||
source_scheme_version_id: str | None = None
|
||||
|
||||
Reference in New Issue
Block a user