Spaces:
Sleeping
Sleeping
File size: 787 Bytes
fbb917f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | from typing import Optional
from pydantic import BaseModel
class ExportRequest(BaseModel):
format: str # "xlsx" | "csv" | "pdf_audit" | "xlsx_report"
class ExportResponse(BaseModel):
downloadUrl: Optional[str] = None
blob: Optional[str] = None # base64
fileName: Optional[str] = None
class ExportSummary(BaseModel):
statementId: str
fileName: str
totalRows: int
correctedRows: int
deletedRows: int
accuracy: float
exportedAt: Optional[str] = None
unverifiedCount: int = 0
monthsAvailable: int = 0 # total distinct calendar months in uploaded data
monthsUsedForAverage: int = 3 # always 3; tells the UI what divisor was used
monthRangeLabel: str = "" # human-readable period e.g. "February 2026 – April 2026"
|