@d4l/collect-lib 1.2.0 → 1.3.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
@@ -256,7 +256,7 @@ var FITBIT_SIGNAL_TYPE_ANNOTATIONS = {
256
256
  calories: FITBIT_CALORIES_ANNOTATION,
257
257
  steps: FITBIT_STEPS_ANNOTATION,
258
258
  heartRate: FITBIT_HEART_RATE_ANNOTATION,
259
- heartRateVariability: FITBIT_HEART_RATE_VARIABILITY_ANNOTATION,
259
+ hrv: FITBIT_HEART_RATE_VARIABILITY_ANNOTATION,
260
260
  respiratoryRate: FITBIT_BREATHING_RATE_ANNOTATION,
261
261
  skinTemperature: FITBIT_SKIN_TEMPERATURE_ANNOTATION,
262
262
  sleep: FITBIT_SLEEP_ANNOTATION,
@@ -759,7 +759,7 @@ var APPLE_HEALTH_SIGNAL_TYPE_ANNOTATIONS = {
759
759
  var RECORDING_MODEL_CURRENT_VERSION = "0.0.6";
760
760
 
761
761
  // src/types/recordingSignal.ts
762
- var RECORDING_SIGNAL_MODEL_CURRENT_VERSION = "0.0.8";
762
+ var RECORDING_SIGNAL_MODEL_CURRENT_VERSION = "1.0.0";
763
763
 
764
764
  // src/donation/keyHandler.ts
765
765
  import * as secpUtils from "@noble/curves/abstract/utils";
@@ -4687,17 +4687,12 @@ function toFHIRBundleEntries(signal) {
4687
4687
  }
4688
4688
  function toFHIRDocumentReference(signal, deviceUrn) {
4689
4689
  var _a;
4690
- const { items, annotation, type, deviceKey, deviceFullName, deviceShortName, version } = signal;
4690
+ const { data, annotation, type, deviceKey, deviceFullName, deviceShortName, version } = signal;
4691
4691
  const entrySize = annotation.reduce((sum, { size }) => sum + size, 0);
4692
- if (!items) {
4693
- console.error("[Recording Signal] Missing data items for document reference");
4692
+ if (!data) {
4693
+ console.error("[Recording Signal] Missing data for document reference");
4694
4694
  return void 0;
4695
4695
  }
4696
- const data = items.flatMap((item) => {
4697
- const dateBuffer = Buffer9.alloc(DEVICE_ANNOTATION_TIMESTAMP_SIZE);
4698
- dateBuffer.writeUIntLE(item.date.getTime(), 0, DEVICE_ANNOTATION_TIMESTAMP_SIZE);
4699
- return [...dateBuffer, ...item.value];
4700
- });
4701
4696
  return {
4702
4697
  resourceType: "DocumentReference",
4703
4698
  status: "current",