@d4l/collect-lib 1.58.0 → 1.58.1

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 CHANGED
@@ -577,12 +577,10 @@ interface SDKDeviceConfig extends BaseDeviceConfig {
577
577
  device: DEVICE_KEY_SDK;
578
578
  dataTypes: DEVICE_SIGNAL_TYPE[];
579
579
  }
580
- interface BleDeviceMetaLabel {
580
+ type BleDeviceMetaLabel = {
581
581
  device: string;
582
582
  name: string;
583
- de?: string;
584
- en?: string;
585
- }
583
+ } & TranslatedString;
586
584
  type DEVICE_KEY = DEVICE_KEY_BLE | DEVICE_KEY_API | DEVICE_KEY_SDK | DEVICE_KEY_INTERNAL;
587
585
  type DEVICE_KEY_BLE = 'DOT' | 'OH1' | 'H10' | 'EstimoteUWB' | 'PixelWatch' | 'GalaxyWatch6';
588
586
  type DEVICE_KEY_API = 'FITBIT' | 'GOOGLE_HEALTH' | 'OURA' | 'GARMIN' | 'LINE_SYSTEMS' | 'DEXCOM' | 'dexcom_g4' | 'dexcom_g5' | 'dexcom_g6' | 'dexcom_g6+' | 'dexcom_g7';
package/dist/index.d.ts CHANGED
@@ -577,12 +577,10 @@ interface SDKDeviceConfig extends BaseDeviceConfig {
577
577
  device: DEVICE_KEY_SDK;
578
578
  dataTypes: DEVICE_SIGNAL_TYPE[];
579
579
  }
580
- interface BleDeviceMetaLabel {
580
+ type BleDeviceMetaLabel = {
581
581
  device: string;
582
582
  name: string;
583
- de?: string;
584
- en?: string;
585
- }
583
+ } & TranslatedString;
586
584
  type DEVICE_KEY = DEVICE_KEY_BLE | DEVICE_KEY_API | DEVICE_KEY_SDK | DEVICE_KEY_INTERNAL;
587
585
  type DEVICE_KEY_BLE = 'DOT' | 'OH1' | 'H10' | 'EstimoteUWB' | 'PixelWatch' | 'GalaxyWatch6';
588
586
  type DEVICE_KEY_API = 'FITBIT' | 'GOOGLE_HEALTH' | 'OURA' | 'GARMIN' | 'LINE_SYSTEMS' | 'DEXCOM' | 'dexcom_g4' | 'dexcom_g5' | 'dexcom_g6' | 'dexcom_g6+' | 'dexcom_g7';
package/dist/index.js CHANGED
@@ -44,15 +44,16 @@ function toDeviceConfig(devices) {
44
44
  type: "ble",
45
45
  device: device.type,
46
46
  dataTypes: device.dataTypes,
47
- labels: (device.labels || []).map((label) => {
48
- var _a, _b, _c, _d;
49
- return {
50
- device: device.type,
51
- de: (_b = (_a = label.de) != null ? _a : label.en) != null ? _b : label.name,
52
- en: (_d = (_c = label.en) != null ? _c : label.de) != null ? _d : label.name,
53
- name: label.name
54
- };
55
- }),
47
+ labels: (device.labels || []).map(
48
+ (label) => {
49
+ var _a, _b, _c, _d;
50
+ return _chunkDDAAVRWGjs.__spreadProps.call(void 0, _chunkDDAAVRWGjs.__spreadValues.call(void 0, {}, label), {
51
+ device: device.type,
52
+ de: (_b = (_a = label.de) != null ? _a : label.en) != null ? _b : label.name,
53
+ en: (_d = (_c = label.en) != null ? _c : label.de) != null ? _d : label.name
54
+ });
55
+ }
56
+ ),
56
57
  outputRate: device.outputRate,
57
58
  streamingMode: device.streamingMode,
58
59
  sensorDelay: device.sensorDelay
@@ -720,8 +721,12 @@ function invertLabelMap(map) {
720
721
  return inverted;
721
722
  }
722
723
  var SLEEP_LEVEL_LABELS = invertLabelMap(FITBIT_SLEEP_LEVEL_MAP);
723
- var APPLE_HEALTH_SLEEP_STATE_LABELS = invertLabelMap(APPLE_HEALTH_SLEEP_STATE_MAP);
724
- var HEALTH_CONNECT_SLEEP_STAGE_LABELS = invertLabelMap(HEALTH_CONNECT_SLEEP_STAGE_MAP);
724
+ var APPLE_HEALTH_SLEEP_STATE_LABELS = invertLabelMap(
725
+ APPLE_HEALTH_SLEEP_STATE_MAP
726
+ );
727
+ var HEALTH_CONNECT_SLEEP_STAGE_LABELS = invertLabelMap(
728
+ HEALTH_CONNECT_SLEEP_STAGE_MAP
729
+ );
725
730
  var ACTIVITY_DETECTION_LABELS = {
726
731
  0: "unknown",
727
732
  1: "exercise",
@@ -1067,7 +1072,9 @@ var OURA_ANNOTATION_ITEM_BATTERY_LEVEL = {
1067
1072
  littleEndian: true,
1068
1073
  unit: "%"
1069
1074
  };
1070
- var OURA_BATTERY_LEVEL_ANNOTATION = [OURA_ANNOTATION_ITEM_BATTERY_LEVEL];
1075
+ var OURA_BATTERY_LEVEL_ANNOTATION = [
1076
+ OURA_ANNOTATION_ITEM_BATTERY_LEVEL
1077
+ ];
1071
1078
  var OURA_SIGNAL_TYPE_ANNOTATIONS = {
1072
1079
  calories: FITBIT_CALORIES_ANNOTATION,
1073
1080
  steps: FITBIT_STEPS_ANNOTATION,