@d4l/collect-lib 1.57.1 → 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.mjs 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 __spreadProps(__spreadValues({}, 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,
@@ -8459,6 +8466,11 @@ function ULIDtoUUID(ulid, opts) {
8459
8466
  // src/helper/question.ts
8460
8467
  var OTHER_ANSWER_CODE = "#other";
8461
8468
  var getFollowUpQuestionLinkId = (linkId) => `${linkId}${OTHER_ANSWER_CODE}`;
8469
+ var BYOD_SURVEY_NAME = "byod_wearables_sensors";
8470
+ var BYOD_NONE_ANSWER_CODE = "BYOD_NONE";
8471
+ var BYOD_DEVICES_LINK_ID = "byod_devices";
8472
+ var GENERATED_SURVEY_NAMES = [BYOD_SURVEY_NAME];
8473
+ var isGeneratedSurveyName = (name) => GENERATED_SURVEY_NAMES.includes(name);
8462
8474
 
8463
8475
  // src/configuration/apis.ts
8464
8476
  var API_TARGET_MAP = {
@@ -8641,6 +8653,9 @@ export {
8641
8653
  BLE_PSMS_ANNOTATION_ITEM_PPG_IR,
8642
8654
  BLE_PSMS_ANNOTATION_ITEM_PPG_RED,
8643
8655
  BLE_PSMS_ANNOTATION_ITEM_SKIN_TEMPERATURE,
8656
+ BYOD_DEVICES_LINK_ID,
8657
+ BYOD_NONE_ANSWER_CODE,
8658
+ BYOD_SURVEY_NAME,
8644
8659
  BoolGuard,
8645
8660
  CPMSHealthServicesActivityDetectionAnnotation,
8646
8661
  CPMSHealthServicesPassiveDataAnnotation,
@@ -8927,6 +8942,7 @@ export {
8927
8942
  isArrayAnswer,
8928
8943
  isBeforeStartDate,
8929
8944
  isFlatAnswer,
8945
+ isGeneratedSurveyName,
8930
8946
  isGeoLocationAnswer,
8931
8947
  isMatrixAnswer,
8932
8948
  isNotAfterEndDate,