@d4l/collect-lib 1.38.0 → 1.39.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.mjs CHANGED
@@ -39,6 +39,7 @@ function toDeviceConfig(devices) {
39
39
  case "DEXCOM":
40
40
  case "FITBIT":
41
41
  case "GOOGLE_HEALTH":
42
+ case "OURA":
42
43
  return {
43
44
  type: "api",
44
45
  device: device.type,
@@ -85,6 +86,7 @@ var DEVICE_KEY_TO_NAME = {
85
86
  GalaxyWatch6: { shortName: "Galaxy Watch", fullName: "Samsung Galaxy Watch 6" },
86
87
  FITBIT: { shortName: "fitbit", fullName: "fitbit" },
87
88
  GOOGLE_HEALTH: { shortName: "Google Health", fullName: "Google Health" },
89
+ OURA: { shortName: "Oura", fullName: "Oura Ring" },
88
90
  DEXCOM: { shortName: "Dexcom", fullName: "Dexcom" },
89
91
  dexcom_g4: { shortName: "Dexcom G4", fullName: "Dexcom G4" },
90
92
  dexcom_g5: { shortName: "Dexcom G5", fullName: "Dexcom G5" },
@@ -333,6 +335,45 @@ var GOOGLE_HEALTH_SIGNAL_TYPE_ANNOTATIONS = {
333
335
  spo2: FITBIT_SPO2_ANNOTATION
334
336
  };
335
337
 
338
+ // src/devices/annotations/oura.ts
339
+ var OURA_ANNOTATION_ITEM_STRESS = {
340
+ type: "stress",
341
+ size: 4,
342
+ format: "float32",
343
+ littleEndian: true,
344
+ unit: "level"
345
+ };
346
+ var OURA_STRESS_ANNOTATION = [OURA_ANNOTATION_ITEM_STRESS];
347
+ var OURA_ANNOTATION_ITEM_WORKOUT = {
348
+ type: "workout",
349
+ size: 4,
350
+ format: "unsignedInt",
351
+ littleEndian: true,
352
+ unit: "s"
353
+ };
354
+ var OURA_WORKOUT_ANNOTATION = [OURA_ANNOTATION_ITEM_WORKOUT];
355
+ var OURA_ANNOTATION_ITEM_TAG = {
356
+ type: "tag",
357
+ size: 4,
358
+ format: "unsignedInt",
359
+ littleEndian: true,
360
+ unit: "s"
361
+ };
362
+ var OURA_TAG_ANNOTATION = [OURA_ANNOTATION_ITEM_TAG];
363
+ var OURA_SIGNAL_TYPE_ANNOTATIONS = {
364
+ calories: FITBIT_CALORIES_ANNOTATION,
365
+ steps: FITBIT_STEPS_ANNOTATION,
366
+ heartRate: FITBIT_HEART_RATE_ANNOTATION,
367
+ hrv: FITBIT_HEART_RATE_VARIABILITY_ANNOTATION,
368
+ respiratoryRate: FITBIT_BREATHING_RATE_ANNOTATION,
369
+ skinTemperature: FITBIT_SKIN_TEMPERATURE_ANNOTATION,
370
+ sleep: FITBIT_SLEEP_ANNOTATION,
371
+ spo2: FITBIT_SPO2_ANNOTATION,
372
+ stress: OURA_STRESS_ANNOTATION,
373
+ workout: OURA_WORKOUT_ANNOTATION,
374
+ tag: OURA_TAG_ANNOTATION
375
+ };
376
+
336
377
  // src/devices/annotations/movella.ts
337
378
  var DEVICE_MOVELLA_ANNOTATION_ITEM_TIMESTAMP = {
338
379
  type: "timestamp",
@@ -5732,6 +5773,20 @@ var API_TARGET_MAP = {
5732
5773
  tokenEndpoint: "https://oauth2.googleapis.com/token",
5733
5774
  dataEndpoint: "https://health.googleapis.com/v4"
5734
5775
  }
5776
+ },
5777
+ OURA: {
5778
+ prod: {
5779
+ loginEndpoint: "https://cloud.ouraring.com/oauth/authorize",
5780
+ tokenEndpoint: "https://api.ouraring.com/oauth/token",
5781
+ dataEndpoint: "https://api.ouraring.com"
5782
+ },
5783
+ sandbox: {
5784
+ // Oura's sandbox shares the OAuth endpoints; only the data paths differ
5785
+ // (handled in the device via per-endpoint URI prefixing).
5786
+ loginEndpoint: "https://cloud.ouraring.com/oauth/authorize",
5787
+ tokenEndpoint: "https://api.ouraring.com/oauth/token",
5788
+ dataEndpoint: "https://api.ouraring.com"
5789
+ }
5735
5790
  }
5736
5791
  };
5737
5792
  export {
@@ -5875,6 +5930,13 @@ export {
5875
5930
  MinLengthExtension,
5876
5931
  MinValueExtension,
5877
5932
  OTHER_ANSWER_CODE,
5933
+ OURA_ANNOTATION_ITEM_STRESS,
5934
+ OURA_ANNOTATION_ITEM_TAG,
5935
+ OURA_ANNOTATION_ITEM_WORKOUT,
5936
+ OURA_SIGNAL_TYPE_ANNOTATIONS,
5937
+ OURA_STRESS_ANNOTATION,
5938
+ OURA_TAG_ANNOTATION,
5939
+ OURA_WORKOUT_ANNOTATION,
5878
5940
  ObservationTypeSystem,
5879
5941
  Offset,
5880
5942
  PAMSCardioVascularActivityAnnotation,