Add whatsapp feature
This commit is contained in:
@@ -40,17 +40,25 @@ router = APIRouter(prefix="/api/v1/tenants/{tenant_id}/dashboard", tags=["dashbo
|
||||
# Response Models
|
||||
# ============================================================
|
||||
|
||||
class HeadlineData(BaseModel):
|
||||
"""i18n-ready headline data"""
|
||||
key: str = Field(..., description="i18n translation key")
|
||||
params: Dict[str, Any] = Field(default_factory=dict, description="Parameters for translation")
|
||||
|
||||
|
||||
class HealthChecklistItem(BaseModel):
|
||||
"""Individual item in health checklist"""
|
||||
icon: str = Field(..., description="Icon name: check, warning, alert")
|
||||
text: str = Field(..., description="Checklist item text")
|
||||
text: Optional[str] = Field(None, description="Deprecated: Use textKey instead")
|
||||
textKey: Optional[str] = Field(None, description="i18n translation key")
|
||||
textParams: Optional[Dict[str, Any]] = Field(None, description="Parameters for i18n translation")
|
||||
actionRequired: bool = Field(..., description="Whether action is required")
|
||||
|
||||
|
||||
class BakeryHealthStatusResponse(BaseModel):
|
||||
"""Overall bakery health status"""
|
||||
status: str = Field(..., description="Health status: green, yellow, red")
|
||||
headline: str = Field(..., description="Human-readable status headline")
|
||||
headline: HeadlineData = Field(..., description="i18n-ready status headline")
|
||||
lastOrchestrationRun: Optional[str] = Field(None, description="ISO timestamp of last orchestration")
|
||||
nextScheduledRun: str = Field(..., description="ISO timestamp of next scheduled run")
|
||||
checklistItems: List[HealthChecklistItem] = Field(..., description="Status checklist")
|
||||
@@ -83,7 +91,7 @@ class ProductionBatchSummary(BaseModel):
|
||||
class OrchestrationSummaryResponse(BaseModel):
|
||||
"""What the orchestrator did for the user"""
|
||||
runTimestamp: Optional[str] = Field(None, description="When the orchestration ran")
|
||||
runNumber: Optional[int] = Field(None, description="Run sequence number")
|
||||
runNumber: Optional[str] = Field(None, description="Run number identifier")
|
||||
status: str = Field(..., description="Run status")
|
||||
purchaseOrdersCreated: int = Field(..., description="Number of POs created")
|
||||
purchaseOrdersSummary: List[PurchaseOrderSummary] = Field(default_factory=list)
|
||||
|
||||
Reference in New Issue
Block a user