mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
Pull Oura's daily_cycle_phases collection (undocumented in the published OpenAPI spec, but confirmed live and auth-gated identically to every other daily_* collection) on the existing hourly Oura poll. A luteal→follicular transition, or a literal "menstrual" phase day, writes a single-day CycleDayLog(flow=LIGHT, source=OURA) — the same conservative "logged but unspecified intensity" marker the HealthKit unspecified-flow mapping uses. Manual entries always win: the write only ever creates a day that has no existing CycleDayLog row at all, regardless of source, and never updates a row it did not create itself. No MenstrualCycle span is synthesised, mirroring the Apple Health importer precedent. A 403/404 on the endpoint (the expected outcome for most connections — Oura's reproductive-health resources are all absent from its public spec) is swallowed without touching the rest of the Oura connection's sync status. No migration: reuses the existing CycleDayLog.source column and the OURA value already present on MeasurementSource.