diff --git a/.github/workflows/snyk.yaml b/.github/workflows/snyk.yaml index 8731bc7e..97a9baa6 100644 --- a/.github/workflows/snyk.yaml +++ b/.github/workflows/snyk.yaml @@ -34,4 +34,6 @@ jobs: --all-sub-projects --configuration-matching='^runtimeClasspath$' --org=radar-base - --policy-path=$PWD/.snyk + --policy-path=.snyk + --json-file-output=snyk.json + --severity-threshold=high diff --git a/README.md b/README.md index d25ecee2..61b0e3ac 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ - In the `passive` subdirectory, add schemas for passive data collection, like wearables. - In the `stream` subdirectory, add schemas used in Kafka Streams. - The `specifications` directory contains specifications of what data types are collected through which devices. -- Java SDKs for each of the components are provided in the `java-sdk` folder, see installation instructions there. They are automatically generated from the Avro schemas using the Avro 1.8.2 specification. + - Java SDKs for each of the components are provided in the `java-sdk` folder, see installation instructions there. They are automatically generated from the Avro schemas using the Avro specification (version in [Versions.kt](java-sdk/buildSrc/src/main/kotlin/Versions.kt)). ## Usage diff --git a/commons/connector/fitbit/fitbit_intraday_spo2.avsc b/commons/connector/fitbit/fitbit_intraday_spo2.avsc new file mode 100644 index 00000000..c9e8fd8a --- /dev/null +++ b/commons/connector/fitbit/fitbit_intraday_spo2.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "org.radarcns.connector.fitbit", + "type": "record", + "name": "FitbitIntradaySpo2", + "doc": "Intra day spo2 data from fitbit device.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Time that the data was received from the Fitbit API (seconds since the Unix Epoch)." }, + { "name": "spo2", "type": "float", "doc": "Percentage value of SpO2 in the bloodstream. SpO2 data is collected when the user is in an extended period of sleep (at least 3 hours of quality sleep). Spo2 values are calculated on a 5-minute exponentially-moving average and provided at the end of a period of sleep."} + ] +} diff --git a/commons/passive/phone/phone_bluetooth_device_scanned.avsc b/commons/passive/phone/phone_bluetooth_device_scanned.avsc index 80f52d35..2f0f9e44 100644 --- a/commons/passive/phone/phone_bluetooth_device_scanned.avsc +++ b/commons/passive/phone/phone_bluetooth_device_scanned.avsc @@ -8,6 +8,12 @@ {"name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)."}, {"name": "macAddressHash", "type": ["null", "bytes"], "default": null, "doc":"Hash of Nearby Bluetooth device MAC address."}, {"name": "hashSaltReference", "type": ["null", "int"], "doc": "Random identifier associated with the device or installation of the app. If the app gets reinstalled or installed on another device, it's clear during analysis that the mac addresses between iterations are not comparable.", "default": null}, - {"name": "isPaired", "type": ["null","boolean"], "doc": "Whether the bluetooth device is paired.", "default": null} + {"name": "isPaired", "type": ["null","boolean"], "doc": "Whether the bluetooth device is paired. This has been deprecated in favor of pairedState in newer versions.", "default": null}, + {"name": "pairedState", "type": ["null", { + "name": "PairedState", + "type": "enum", + "doc": "Represent the bond state of the remote device. \nNOT_PAIRED indicates the remote device is not paired. \nPAIRING indicates pairing is in progress with the remote device. \nPAIRED Indicates the remote device is paired. \nUNKNOWN indicates the pairing status is not known.", + "symbols": ["NOT_PAIRED", "PAIRING", "PAIRED", "UNKNOWN"] + }], "doc": "Indicates the current paired status of the remote device.", "default": null } ] } diff --git a/java-sdk/build.gradle.kts b/java-sdk/build.gradle.kts index 3a9d76c7..bb1c88b9 100644 --- a/java-sdk/build.gradle.kts +++ b/java-sdk/build.gradle.kts @@ -57,7 +57,7 @@ configure(listOf( apply(plugin = "org.radarbase.radar-publishing") radarKotlin { - javaVersion.set(11) + javaVersion.set(Versions.java) } radarPublishing { diff --git a/java-sdk/buildSrc/build.gradle.kts b/java-sdk/buildSrc/build.gradle.kts index 1854997d..76639766 100644 --- a/java-sdk/buildSrc/build.gradle.kts +++ b/java-sdk/buildSrc/build.gradle.kts @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "1.9.10" + kotlin("jvm") version "1.9.22" } repositories { diff --git a/java-sdk/buildSrc/src/main/kotlin/Versions.kt b/java-sdk/buildSrc/src/main/kotlin/Versions.kt index 460dd171..186275ca 100644 --- a/java-sdk/buildSrc/src/main/kotlin/Versions.kt +++ b/java-sdk/buildSrc/src/main/kotlin/Versions.kt @@ -1,20 +1,20 @@ object Versions { - const val project = "0.8.6" + const val project = "0.8.7" const val kotlin = "1.9.10" const val java = 17 - const val avroGenerator = "1.5.0" + const val avroGenerator = "1.9.1" - const val radarCommons = "1.1.1-SNAPSHOT" - const val avro = "1.11.1" - const val jackson = "2.15.2" + const val radarCommons = "1.1.2" + const val avro = "1.11.3" + const val jackson = "2.16.1" const val argparse = "0.9.0" - const val radarJersey = "0.11.0-SNAPSHOT" - const val junit = "5.10.0" - const val confluent = "7.5.0" + const val radarJersey = "0.11.1" + const val junit = "5.10.1" + const val confluent = "7.6.0" const val kafka = "$confluent-ce" - const val okHttp = "4.11.0" - const val ktor = "2.3.0" + const val okHttp = "4.12.0" + const val ktor = "2.3.4" const val slf4j = "2.0.9" const val jakartaValidation = "3.0.2" const val log4j2 = "2.20.0" diff --git a/java-sdk/radar-schemas-registration/build.gradle.kts b/java-sdk/radar-schemas-registration/build.gradle.kts index 2d44b8f5..e70db27b 100644 --- a/java-sdk/radar-schemas-registration/build.gradle.kts +++ b/java-sdk/radar-schemas-registration/build.gradle.kts @@ -16,5 +16,5 @@ dependencies { implementation("io.confluent:kafka-schema-registry-client:${Versions.confluent}") implementation("org.apache.kafka:connect-json:${Versions.kafka}") - implementation("io.ktor:ktor-client-auth:2.3.4") + implementation("io.ktor:ktor-client-auth:${Versions.ktor}") } diff --git a/specifications/connector/radar-fitbit-connector.yml b/specifications/connector/radar-fitbit-connector.yml index 3825f4e0..259959c2 100644 --- a/specifications/connector/radar-fitbit-connector.yml +++ b/specifications/connector/radar-fitbit-connector.yml @@ -37,3 +37,9 @@ data: - doc: Skin temperature topic: connect_fitbit_skin_temperature value_schema: .connector.fitbit.FitbitSkinTemperature + - doc: Spo2 or Blood oxygen saturation + topic: connect_fitbit_intraday_spo2 + value_schema: .connector.fitbit.FitbitIntradaySpo2 + - doc: Resting heart rate + topic: connect_fitbit_resting_heart_rate + value_schema: .connector.fitbit.FitbitRestingHeartRate