From b3a441ef9229487c03ad55d307bce4b94d19a232 Mon Sep 17 00:00:00 2001 From: mpgxvii Date: Wed, 21 Jun 2023 15:52:58 +0100 Subject: [PATCH] Update Oura schemas --- commons/connector/oura/oura_heart_rate.avsc | 4 ++-- commons/connector/oura/oura_readiness.avsc | 24 --------------------- commons/connector/oura/oura_session.avsc | 9 ++++---- commons/connector/oura/oura_workout.avsc | 9 ++++---- 4 files changed, 10 insertions(+), 36 deletions(-) delete mode 100644 commons/connector/oura/oura_readiness.avsc diff --git a/commons/connector/oura/oura_heart_rate.avsc b/commons/connector/oura/oura_heart_rate.avsc index 94c6a9c6..0efef30b 100644 --- a/commons/connector/oura/oura_heart_rate.avsc +++ b/commons/connector/oura/oura_heart_rate.avsc @@ -8,7 +8,7 @@ {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "bpm", "type": ["null", "int"], "doc": "Heart rate in beats per minute.", "default": null}, {"name": "source", "type": - {"name": "OuraHeartRateSource", "type": "enum", "symbols": ["AWAKE", "REST", "SLEEP", "SESSION", "LIVE", "UNKNOWN"], "doc": "Heart rate source type as computed by Oura."}, - "doc": "Heart rate source type as computed by Oura.", "default": "UNKNOWN" } + {"name": "OuraHeartRateSource", "type": "enum", "symbols": ["AWAKE", "REST", "SLEEP", "SESSION", "LIVE", "WORKOUT", "UNKNOWN"], "doc": "Heart rate source type as computed by Oura."}, + "doc": "Heart rate source type as computed by Oura. UNKNOWN when this data is not provided (e.g. samples from sleep API).", "default": "UNKNOWN" } ] } diff --git a/commons/connector/oura/oura_readiness.avsc b/commons/connector/oura/oura_readiness.avsc deleted file mode 100644 index 38f7b86b..00000000 --- a/commons/connector/oura/oura_readiness.avsc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "namespace": "org.radarcns.connector.oura", - "name": "OuraReadiness", - "type": "record", - "doc": "This describes a user's readiness level. Readiness tells how ready you are for the day.", - "fields": [ - {"name": "time", "type": "double", "doc": "Timestamp of the daily readiness in seconds since the Unix Epoch (s)."}, - {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, - {"name": "id", "type": ["null", "string"], "doc": "ID of the record.", "default": null}, - {"name": "day", "type": ["null", "string"], "doc": "Day that the daily readiness belongs to.", "default": null}, - {"name": "score", "type": ["null", "int"], "doc": "Daily readiness score.", "default": null}, - {"name": "contributorActivityBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorBodyTemperature", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorHrvBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorPreviousDayActivity", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorPreviousNight", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorRecoveryIndex", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorRestingHeartRate", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "contributorSleepBalance", "type": ["null", "int"], "doc": "Contribution of cumulative activity balance to the readiness score in range [1, 100].", "default": null}, - {"name": "temperatureDeviation", "type": ["null", "float"], "doc": "Temperature deviation in degrees Celsius.", "default": null}, - {"name": "temperatureTrendDeviation", "type": ["null", "float"], "doc": "Temperature trend deviation in degrees Celsius.", "default": null} - - ] -} diff --git a/commons/connector/oura/oura_session.avsc b/commons/connector/oura/oura_session.avsc index ab64a0b8..2d194452 100644 --- a/commons/connector/oura/oura_session.avsc +++ b/commons/connector/oura/oura_session.avsc @@ -4,16 +4,15 @@ "type": "record", "doc": "The Sessions data scope provides information on how users engage with guided and unguided sessions in the Oura app, including the user’s biometric trends during the sessions.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Start time of the session in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "endTime", "type": ["null", "string"], "doc": "Timestamp indicating when the session ended. Null if unknown.", "default": null}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the session from Oura.", "default": null}, - {"name": "startDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout started. Null if unknown.", "default": null}, - {"name": "endDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout ended. Null if unknown.", "default": null}, {"name": "type", "type": {"name": "OuraMomentType", "type": "enum", "symbols": ["BREATHING", "MEDITATION", "NAP", "RELAXATION", "REST", "BODY_STATUS", "UNKNOWN"], "doc": "Possible Oura Moment types."}, - "doc": "Oura Moment type.", "default": "UNKNOWN" }, + "doc": "Oura Moment type. UNKNOWN when this data is not provided by Oura.", "default": "UNKNOWN" }, {"name": "mood", "type": {"name": "OuraMomentMood", "type": "enum", "symbols": ["BAD", "WORSE", "SAME", "GOOD", "GREAT", "UNKNOWN"], "doc": "Possible Oura Moment moods."}, - "doc": "Oura Moment mood.", "default": "UNKNOWN" } + "doc": "Oura Moment mood. UNKNOWN when this data is not provided by Oura.", "default": "UNKNOWN" } ] } diff --git a/commons/connector/oura/oura_workout.avsc b/commons/connector/oura/oura_workout.avsc index 7a4834ef..1c408ac9 100644 --- a/commons/connector/oura/oura_workout.avsc +++ b/commons/connector/oura/oura_workout.avsc @@ -4,20 +4,19 @@ "type": "record", "doc": "The Workout data scope includes information about user workouts. This is a diverse, growing list of workouts that help inform how the user is training and exercising.", "fields": [ - {"name": "time", "type": "double", "doc": "Start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "time", "type": "double", "doc": "Start time of the workout in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp)."}, + {"name": "endTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout ended. Null if unknown.", "default": null}, {"name": "timeReceived", "type": "double", "doc": "Time that this record was collected by a service in seconds since the Unix Epoch (s)."}, {"name": "id", "type": ["null", "string"], "doc": "Unique identifier of the workout from Oura.", "default": null}, {"name": "calories", "type": ["null", "float"], "doc": "Energy burned in kilocalories during the workout. Null if unknown.", "default": null}, {"name": "day", "type": ["null", "string"], "doc": "Day when the workout occurred. Null if unknown.", "default": null}, {"name": "distance", "type": ["null", "float"], "doc": "Distance traveled in meters during the workout. Null if unknown.", "default": null}, - {"name": "startDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout started. Null if unknown.", "default": null}, - {"name": "endDateTime", "type": ["null", "string"], "doc": "Timestamp indicating when the workout ended. Null if unknown.", "default": null}, {"name": "intensity", "type": {"name": "OuraWorkoutIntensity", "type": "enum", "symbols": ["EASY", "MODERATE", "HARD", "UNKNOWN"], "doc": "Workout intensity as computed by Oura."}, - "doc": "Workout intensity as computed by Oura.", "default": "UNKNOWN" }, + "doc": "Workout intensity as computed by Oura. UNKNOWN when this data is not provided by Oura.", "default": "UNKNOWN" }, {"name": "label", "type": ["null", "string"], "doc": "User-defined label for the workout. Null if unknown.", "default": null}, {"name": "source", "type": {"name": "OuraWorkoutSource", "type": "enum", "symbols": ["MANUAL", "AUTODETECTED", "CONFIRMED", "WORKOUT_HEART_RATE", "UNKNOWN"], "doc": "Workout source type as computed by Oura."}, - "doc": "Workout source type as computed by Oura.", "default": "UNKNOWN" } + "doc": "Workout source type as computed by Oura. UNKNOWN when this data is not provided by Oura.", "default": "UNKNOWN" } ] }