@d4l/collect-lib 1.36.0 → 1.38.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/README.md +3 -0
- package/dist/index.d.mts +15 -6
- package/dist/index.d.ts +15 -6
- package/dist/index.js +45 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -38,6 +38,7 @@ function toDeviceConfig(devices) {
|
|
|
38
38
|
}));
|
|
39
39
|
case "DEXCOM":
|
|
40
40
|
case "FITBIT":
|
|
41
|
+
case "GOOGLE_HEALTH":
|
|
41
42
|
return {
|
|
42
43
|
type: "api",
|
|
43
44
|
device: device.type,
|
|
@@ -83,6 +84,7 @@ var DEVICE_KEY_TO_NAME = {
|
|
|
83
84
|
PixelWatch1: { shortName: "Pixel Watch", fullName: "Google Pixel Watch" },
|
|
84
85
|
GalaxyWatch6: { shortName: "Galaxy Watch", fullName: "Samsung Galaxy Watch 6" },
|
|
85
86
|
FITBIT: { shortName: "fitbit", fullName: "fitbit" },
|
|
87
|
+
GOOGLE_HEALTH: { shortName: "Google Health", fullName: "Google Health" },
|
|
86
88
|
DEXCOM: { shortName: "Dexcom", fullName: "Dexcom" },
|
|
87
89
|
dexcom_g4: { shortName: "Dexcom G4", fullName: "Dexcom G4" },
|
|
88
90
|
dexcom_g5: { shortName: "Dexcom G5", fullName: "Dexcom G5" },
|
|
@@ -319,6 +321,18 @@ var FITBIT_SIGNAL_TYPE_ANNOTATIONS = {
|
|
|
319
321
|
spo2: FITBIT_SPO2_ANNOTATION
|
|
320
322
|
};
|
|
321
323
|
|
|
324
|
+
// src/devices/annotations/google-health.ts
|
|
325
|
+
var GOOGLE_HEALTH_SIGNAL_TYPE_ANNOTATIONS = {
|
|
326
|
+
calories: FITBIT_CALORIES_ANNOTATION,
|
|
327
|
+
steps: FITBIT_STEPS_ANNOTATION,
|
|
328
|
+
heartRate: FITBIT_HEART_RATE_ANNOTATION,
|
|
329
|
+
hrv: FITBIT_HEART_RATE_VARIABILITY_ANNOTATION,
|
|
330
|
+
respiratoryRate: FITBIT_BREATHING_RATE_ANNOTATION,
|
|
331
|
+
skinTemperature: FITBIT_SKIN_TEMPERATURE_ANNOTATION,
|
|
332
|
+
sleep: FITBIT_SLEEP_ANNOTATION,
|
|
333
|
+
spo2: FITBIT_SPO2_ANNOTATION
|
|
334
|
+
};
|
|
335
|
+
|
|
322
336
|
// src/devices/annotations/movella.ts
|
|
323
337
|
var DEVICE_MOVELLA_ANNOTATION_ITEM_TIMESTAMP = {
|
|
324
338
|
type: "timestamp",
|
|
@@ -666,6 +680,14 @@ var BLE_PSMS_ANNOTATION_ITEM_PPG_IR = {
|
|
|
666
680
|
format: "signedInt",
|
|
667
681
|
littleEndian: true
|
|
668
682
|
};
|
|
683
|
+
var BLE_PSMS_ANNOTATION_ITEM_ACCELERATION = {
|
|
684
|
+
type: "samsungSdkAcceleration",
|
|
685
|
+
size: 12,
|
|
686
|
+
format: "signedInt",
|
|
687
|
+
littleEndian: true,
|
|
688
|
+
channels: 3,
|
|
689
|
+
channelLabels: ["x", "y", "z"]
|
|
690
|
+
};
|
|
669
691
|
var BLE_PSMS_ANNOTATION_ITEM_SKIN_TEMPERATURE = {
|
|
670
692
|
type: "skinTemperature",
|
|
671
693
|
size: 4,
|
|
@@ -744,6 +766,10 @@ var PSMSPPGIRAnnotation = [
|
|
|
744
766
|
DEVICE_D4L_COMPANION_ANNOTATION_ITEM_TIMESTAMP,
|
|
745
767
|
BLE_PSMS_ANNOTATION_ITEM_PPG_IR
|
|
746
768
|
];
|
|
769
|
+
var PSMSAccelerationAnnotation = [
|
|
770
|
+
DEVICE_D4L_COMPANION_ANNOTATION_ITEM_TIMESTAMP,
|
|
771
|
+
BLE_PSMS_ANNOTATION_ITEM_ACCELERATION
|
|
772
|
+
];
|
|
747
773
|
var WearOS3AnnotationMap = {
|
|
748
774
|
imu: [IMUAnnotation],
|
|
749
775
|
heartRate: [DEVICE_ANNOTATION_HEARTRATE],
|
|
@@ -763,7 +789,8 @@ var WearOS3AnnotationMap = {
|
|
|
763
789
|
PSMSSkinTemperatureAnnotation,
|
|
764
790
|
PSMSPPGGreenAnnotation,
|
|
765
791
|
PSMSPPGRedAnnotation,
|
|
766
|
-
PSMSPPGIRAnnotation
|
|
792
|
+
PSMSPPGIRAnnotation,
|
|
793
|
+
PSMSAccelerationAnnotation
|
|
767
794
|
]
|
|
768
795
|
};
|
|
769
796
|
|
|
@@ -5692,6 +5719,19 @@ var API_TARGET_MAP = {
|
|
|
5692
5719
|
tokenEndpoint: "https://api.fitbit.com/oauth2/token",
|
|
5693
5720
|
dataEndpoint: "https://api.fitbit.com"
|
|
5694
5721
|
}
|
|
5722
|
+
},
|
|
5723
|
+
GOOGLE_HEALTH: {
|
|
5724
|
+
prod: {
|
|
5725
|
+
loginEndpoint: "https://accounts.google.com/o/oauth2/v2/auth",
|
|
5726
|
+
tokenEndpoint: "https://oauth2.googleapis.com/token",
|
|
5727
|
+
dataEndpoint: "https://health.googleapis.com/v4"
|
|
5728
|
+
},
|
|
5729
|
+
sandbox: {
|
|
5730
|
+
// No sandbox for Google Health
|
|
5731
|
+
loginEndpoint: "https://accounts.google.com/o/oauth2/v2/auth",
|
|
5732
|
+
tokenEndpoint: "https://oauth2.googleapis.com/token",
|
|
5733
|
+
dataEndpoint: "https://health.googleapis.com/v4"
|
|
5734
|
+
}
|
|
5695
5735
|
}
|
|
5696
5736
|
};
|
|
5697
5737
|
export {
|
|
@@ -5749,6 +5789,7 @@ export {
|
|
|
5749
5789
|
BLE_PAMS_ANNOTATION_ITEM_THREE_BYTES,
|
|
5750
5790
|
BLE_PAMS_ANNOTATION_ITEM_TWO_BYTES,
|
|
5751
5791
|
BLE_PAMS_ANNOTATION_ITEM_VO2_MAX,
|
|
5792
|
+
BLE_PSMS_ANNOTATION_ITEM_ACCELERATION,
|
|
5752
5793
|
BLE_PSMS_ANNOTATION_ITEM_HEART_RATE,
|
|
5753
5794
|
BLE_PSMS_ANNOTATION_ITEM_IBI,
|
|
5754
5795
|
BLE_PSMS_ANNOTATION_ITEM_PPG_GREEN,
|
|
@@ -5815,6 +5856,7 @@ export {
|
|
|
5815
5856
|
FITBIT_SLEEP_LEVEL_MAP,
|
|
5816
5857
|
FITBIT_SPO2_ANNOTATION,
|
|
5817
5858
|
FITBIT_STEPS_ANNOTATION,
|
|
5859
|
+
GOOGLE_HEALTH_SIGNAL_TYPE_ANNOTATIONS,
|
|
5818
5860
|
HEALTH_CONNECT_ANNOTATION_ITEM_SLEEP_DURATION,
|
|
5819
5861
|
HEALTH_CONNECT_ANNOTATION_ITEM_SLEEP_STAGE,
|
|
5820
5862
|
HEALTH_CONNECT_ANNOTATION_ITEM_STEPS,
|
|
@@ -5839,6 +5881,7 @@ export {
|
|
|
5839
5881
|
PAMSGeneralActivityInstantaneousAnnotation,
|
|
5840
5882
|
PAMSGeneralActivitySummaryAnnotation,
|
|
5841
5883
|
PAMSStepCounterActivitySummaryAnnotation,
|
|
5884
|
+
PSMSAccelerationAnnotation,
|
|
5842
5885
|
PSMSHeartRateAnnotation,
|
|
5843
5886
|
PSMSPPGGreenAnnotation,
|
|
5844
5887
|
PSMSPPGIRAnnotation,
|