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:
@@ -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",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user