Skip to content

docs(api): calendar event days, range delete and optional summary - #1054

Merged
ysyneu merged 1 commit into
mainfrom
docs/calendar-days
Oct 14, 2026
Merged

ysyneu merged 1 commit into
mainfrom
docs/calendar-days

Conversation

@ysyneu

@ysyneu ysyneu commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

What

Bring the calendar event API reference and the service calendar guide in line with current behavior.

API reference (openapi.{en,zh}.json, on-call.openapi.{en,zh}.json)

  • POST /calendar/event/list: response adds days, keyed by YYYY-MM-DD, each a new CalDay (is_off, event_id, layer = custom / holiday / weekly). The description states the resolution order: the calendar's own events, then linked holiday calendars, then weekly workdays; inside a layer a working-day event beats a day off.
  • POST /calendar/event/delete: event_id is now optional; start_at + end_at clear the calendar's own events off [start_at, end_at). Exactly one of the two forms.
  • POST /calendar/event/upsert: summary is optional (no minLength); the description covers how a write trims the calendar's other own events on the same days, and that end_at must be later than start_at.

Guide ({zh,en}/on-call/configuration/service-calendar.mdx)

  • "Adjust dates" row describes selecting a day or a range and the action bar buttons (labels match the console).
  • New FAQ: which setting wins when a day has several, what "Reset to default" does, and what the colors mean.

Checks

  • python3 scripts/lint_openapi.py → OK: 12 spec files, no violations
  • mint broken-links → no broken links

- /calendar/event/list returns days: the resolved state of every day in
  the scope (is_off, event_id, layer), decided by the calendar's own
  events, then linked holiday calendars, then weekly workdays.
- /calendar/event/delete clears a date range when start_at and end_at
  are given instead of event_id.
- /calendar/event/upsert: summary is optional; a write trims the
  calendar's other own events off the same days; end_at must be later
  than start_at.
- Service calendar guide: date-range adjustment from the action bar and
  how overlapping settings are resolved.
@ysyneu
ysyneu merged commit 566e74f into main Oct 14, 2026
2 checks passed
@ysyneu
ysyneu deleted the docs/calendar-days branch October 14, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant