BE-CAL-API-007: implement date-list API endpoint

- Add GET /calendar/dates endpoint that returns sorted future dates
  with at least one materialized (real) slot
- Excludes skipped/aborted slots and pure plan-generated virtual dates
- Add DateListResponse schema
This commit is contained in:
zhi
2026-03-31 20:46:34 +00:00
parent 78d836c71e
commit 22a0097a5d
2 changed files with 61 additions and 0 deletions

View File

@@ -391,3 +391,19 @@ class SchedulePlanCancelResponse(BaseModel):
default_factory=list,
description="IDs of past materialized slots that were NOT affected",
)
# ---------------------------------------------------------------------------
# Calendar date-list (BE-CAL-API-007)
# ---------------------------------------------------------------------------
class DateListResponse(BaseModel):
"""Response for the date-list endpoint.
Returns only dates that have at least one materialized (real) future
slot. Pure plan-generated (virtual) dates are excluded.
"""
dates: list[date] = Field(
default_factory=list,
description="Sorted list of future dates with materialized slots",
)