@d4l/collect-lib 1.21.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.js +53 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -44,6 +44,7 @@ function toDeviceConfig(devices) {
|
|
|
44
44
|
dataTypes: device.dataTypes
|
|
45
45
|
};
|
|
46
46
|
case "AppleHealth":
|
|
47
|
+
case "HealthConnect":
|
|
47
48
|
return {
|
|
48
49
|
type: "sdk",
|
|
49
50
|
device: device.type,
|
|
@@ -101,7 +102,8 @@ var DEVICE_KEY_TO_NAME = {
|
|
|
101
102
|
fullName: "Internal Beacon Sensing"
|
|
102
103
|
},
|
|
103
104
|
// Placeholder, there is no such device
|
|
104
|
-
AppleHealth: { shortName: "Apple HealthKit", fullName: "Apple HealthKit" }
|
|
105
|
+
AppleHealth: { shortName: "Apple HealthKit", fullName: "Apple HealthKit" },
|
|
106
|
+
HealthConnect: { shortName: "Health Connect", fullName: "Android Health Connect" }
|
|
105
107
|
};
|
|
106
108
|
|
|
107
109
|
// src/devices/annotations/base.ts
|
|
@@ -801,6 +803,48 @@ var APPLE_HEALTH_SIGNAL_TYPE_ANNOTATIONS = {
|
|
|
801
803
|
sleepAnalysis: APPLE_HEALTH_SLEEP_ANALYSIS_ANNOTATION
|
|
802
804
|
};
|
|
803
805
|
|
|
806
|
+
// src/devices/annotations/healthConnect.ts
|
|
807
|
+
var HEALTH_CONNECT_ANNOTATION_ITEM_STEPS = {
|
|
808
|
+
type: "steps",
|
|
809
|
+
size: 4,
|
|
810
|
+
format: "signedInt",
|
|
811
|
+
littleEndian: true
|
|
812
|
+
};
|
|
813
|
+
var HEALTH_CONNECT_STEPS_ANNOTATION = [
|
|
814
|
+
HEALTH_CONNECT_ANNOTATION_ITEM_STEPS
|
|
815
|
+
];
|
|
816
|
+
var HEALTH_CONNECT_SLEEP_STAGE_MAP = {
|
|
817
|
+
unknown: 0,
|
|
818
|
+
awake: 1,
|
|
819
|
+
sleeping: 2,
|
|
820
|
+
awakeOutOfBed: 3,
|
|
821
|
+
sleepingLight: 4,
|
|
822
|
+
sleepingDeep: 5,
|
|
823
|
+
sleepingRem: 6,
|
|
824
|
+
awakeInBed: 7
|
|
825
|
+
};
|
|
826
|
+
var HEALTH_CONNECT_ANNOTATION_ITEM_SLEEP_STAGE = {
|
|
827
|
+
type: "sleepStage",
|
|
828
|
+
size: 1,
|
|
829
|
+
format: "unsignedInt",
|
|
830
|
+
littleEndian: true
|
|
831
|
+
};
|
|
832
|
+
var HEALTH_CONNECT_ANNOTATION_ITEM_SLEEP_DURATION = {
|
|
833
|
+
type: "duration",
|
|
834
|
+
size: 2,
|
|
835
|
+
format: "unsignedInt",
|
|
836
|
+
littleEndian: true,
|
|
837
|
+
unit: "s"
|
|
838
|
+
};
|
|
839
|
+
var HEALTH_CONNECT_SLEEP_ANNOTATION = [
|
|
840
|
+
HEALTH_CONNECT_ANNOTATION_ITEM_SLEEP_STAGE,
|
|
841
|
+
HEALTH_CONNECT_ANNOTATION_ITEM_SLEEP_DURATION
|
|
842
|
+
];
|
|
843
|
+
var HEALTH_CONNECT_SIGNAL_TYPE_ANNOTATIONS = {
|
|
844
|
+
steps: HEALTH_CONNECT_STEPS_ANNOTATION,
|
|
845
|
+
sleep: HEALTH_CONNECT_SLEEP_ANNOTATION
|
|
846
|
+
};
|
|
847
|
+
|
|
804
848
|
// src/types/recording.ts
|
|
805
849
|
var RECORDING_MODEL_CURRENT_VERSION = "0.0.6";
|
|
806
850
|
|
|
@@ -5688,6 +5732,13 @@ export {
|
|
|
5688
5732
|
FITBIT_SLEEP_LEVEL_MAP,
|
|
5689
5733
|
FITBIT_SPO2_ANNOTATION,
|
|
5690
5734
|
FITBIT_STEPS_ANNOTATION,
|
|
5735
|
+
HEALTH_CONNECT_ANNOTATION_ITEM_SLEEP_DURATION,
|
|
5736
|
+
HEALTH_CONNECT_ANNOTATION_ITEM_SLEEP_STAGE,
|
|
5737
|
+
HEALTH_CONNECT_ANNOTATION_ITEM_STEPS,
|
|
5738
|
+
HEALTH_CONNECT_SIGNAL_TYPE_ANNOTATIONS,
|
|
5739
|
+
HEALTH_CONNECT_SLEEP_ANNOTATION,
|
|
5740
|
+
HEALTH_CONNECT_SLEEP_STAGE_MAP,
|
|
5741
|
+
HEALTH_CONNECT_STEPS_ANNOTATION,
|
|
5691
5742
|
IMUAnnotation,
|
|
5692
5743
|
InternalSensorAnnotationTypes,
|
|
5693
5744
|
KeyHandler,
|