feat(autopilot): /autopilot/today liefert Saison-Zusätze für das Bienenjahr-Rad (T5b B5)

- seasons[] bekommt segmentSince, reportedOn und note
  (NO_COORDINATES | WEATHER_GAPS | WEATHER_STALE).
- Neues seasonCalendar: calendarFallback (8 Phasen, MM-DD), swarmSeason und
  winterVarroaWindow aus den Regel-Configs, auch bei inaktiver Regel.
- Nur Zusätze, keine Migration, Recht bleibt colonies:read;
  SEASON_AUTOPILOT wird je Anfrage einmal gelesen.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Nick.RosenloecherandClaude Opus 5.5 committed 2026-10-19 15:55:24 +02:00
1 parent 90d1c5244f
commit bcc7cbfd13
4 files changed
+260 -11

No files matched your search

@@ -84,6 +84,56 @@ class SeasonOfApiaryDto {
phase!: AutopilotToday['seasons'][number]['phase'];
@ApiProperty({ enum: PHASE_SOURCES, nullable: true })
phaseSource!: AutopilotToday['seasons'][number]['phaseSource'];
@ApiProperty({ description: 'Day the current segment began (YYYY-MM-DD).' })
segmentSince!: string;
@ApiProperty({
nullable: true,
type: String,
format: 'date',
description:
'Day of the phase report the phase rests on; null without one.',
})
reportedOn!: string | null;
@ApiProperty({
enum: ['NO_COORDINATES', 'WEATHER_GAPS', 'WEATHER_STALE'],
nullable: true,
})
note!: AutopilotToday['seasons'][number]['note'];
}
class SwarmSeasonDto {
@ApiProperty({ enum: PHENOLOGY_PHASES })
from!: AutopilotToday['seasonCalendar']['swarmSeason']['from'];
@ApiProperty({ enum: PHENOLOGY_PHASES })
until!: AutopilotToday['seasonCalendar']['swarmSeason']['until'];
}
class MonthDayWindowDto {
@ApiProperty({ example: '11-15' }) from!: string;
@ApiProperty({ example: '12-20' }) to!: string;
}
/** Calendar day ('MM-DD') of each phenology phase. */
class CalendarFallbackDto implements Record<
(typeof PHENOLOGY_PHASES)[number],
string
> {
@ApiProperty({ example: '03-20' }) SALWEIDE!: string;
@ApiProperty({ example: '04-15' }) KIRSCHE!: string;
@ApiProperty({ example: '04-28' }) APFEL!: string;
@ApiProperty({ example: '05-30' }) HOLUNDER!: string;
@ApiProperty({ example: '06-20' }) LINDE!: string;
@ApiProperty({ example: '08-01' }) TRACHTENDE!: string;
@ApiProperty({ example: '09-15' }) HERBST!: string;
@ApiProperty({ example: '11-15' }) WINTER!: string;
}
class SeasonCalendarDto {
@ApiProperty({ type: CalendarFallbackDto })
calendarFallback!: CalendarFallbackDto;
@ApiProperty({ type: SwarmSeasonDto }) swarmSeason!: SwarmSeasonDto;
@ApiProperty({ type: MonthDayWindowDto })
winterVarroaWindow!: MonthDayWindowDto;
}
export class AutopilotTodayDto {
@@ -96,5 +146,7 @@ export class AutopilotTodayDto {
inspectionDue!: InspectionDueDto[];
@ApiProperty() suggestionsOpen!: number;
@ApiProperty({ type: [SeasonOfApiaryDto] }) seasons!: SeasonOfApiaryDto[];
@ApiProperty({ type: SeasonCalendarDto })
seasonCalendar!: SeasonCalendarDto;
@ApiProperty() tasksVisible!: boolean;
}