{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/vital-io/main/json-schema/vital-activity-summary-schema.json",
  "title": "VitalActivitySummary",
  "description": "A normalized daily activity summary aggregated from any supported wearable/device source. One record per calendar day per user.",
  "type": "object",
  "required": ["id", "user_id", "calendar_date", "source"],
  "properties": {
    "id": {"type": "string", "format": "uuid"},
    "user_id": {"type": "string", "format": "uuid"},
    "calendar_date": {"type": "string", "format": "date"},
    "steps": {"type": ["integer", "null"]},
    "active_energy_burned": {"type": ["number", "null"], "description": "Active energy expenditure in kcal."},
    "basal_energy_burned": {"type": ["number", "null"], "description": "Basal/resting energy expenditure in kcal."},
    "distance_meter": {"type": ["number", "null"]},
    "floors_climbed": {"type": ["integer", "null"]},
    "low_intensity_minutes": {"type": ["integer", "null"]},
    "medium_intensity_minutes": {"type": ["integer", "null"]},
    "high_intensity_minutes": {"type": ["integer", "null"]},
    "daily_movement": {"type": ["number", "null"]},
    "average_heart_rate": {"type": ["number", "null"]},
    "resting_heart_rate": {"type": ["number", "null"]},
    "source": {
      "type": "object",
      "required": ["provider"],
      "properties": {
        "provider": {"type": "string"},
        "type": {"type": "string"},
        "name": {"type": "string"}
      }
    }
  }
}
