ScheduleConfig
Client-facing structured schedule shape. Shared type for the wire contract — accountsession defines it; the reporting service (or any other consumer producing schedules) translates between this and the flat storage columns (cron-or-token + interval + frequency_unit + timezone).
accountsession does NOT use this directly on the storage Input/Output models — those stay flat to mirror the DB. Consumers build their own request/response Pydantic models using this type.
Field semantics per frequency_unit:
- DAY: day_of_period must be None.
- WEEK: day_of_period must be a non-empty list of full weekday names (monday, tuesday, wednesday, thursday, friday, saturday, sunday). Multi-select.
- MONTH: day_of_period must be a numeric string (e.g. "15"); coerced to int 1..31 by the validator.
- QUARTER: day_of_period must be "first", "last", "fiscal-first", or "fiscal-last". Fiscal anchors are routed to the @fiscal-quarterly token path by the translator.
- YEAR: day_of_period must be "first", "last", "fiscal-first", or "fiscal-last". Fiscal anchors are routed to the @fiscal-yearly token path by the translator.
- FISCAL_QUARTER: day_of_period must be "fiscal-first" or "fiscal-last". Resolved against the account's fiscal_year_start at fire time.
- FISCAL_YEAR: day_of_period must be "fiscal-first" or "fiscal-last".
delivery_time is an ISO datetime string with offset (e.g.
"2026-05-19T08:00:00+03:00"). The server extracts time-of-day (in UTC) for
the cron, and the IANA timezone field carries the user's local tz for
round-trip + DST-correct firing.
- deliveryType: string
Time max length:64required - frequencyType: ScheduleFrequencyUnitenum
Unit requiredSemantic frequency unit. Preserves user intent so we don't reverse-engineer it from the cron string at read time (e.g. distinguishing FISCAL_QUARTER from QUARTER, or 'every 4 weeks' from MONTH).
valuesdayweekmonthquarteryearfiscal_quarterfiscal_year - timezoneType: stringmax length:64required
- daynullable
Of Period - Type: string
- frequencyType: integer
Count min:1The stepper (every Nth occurrence).

