@d4l/collect-lib 1.2.0 → 1.3.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 CHANGED
@@ -20,7 +20,7 @@ yarn start
20
20
  ```
21
21
 
22
22
  React-Native does not work with `yarn link`, because of some symlink issues down the line in metro/expo/whatever.
23
- To workaround we can install the dependency from local with `yarn add ../phoenix-lib`.
23
+ To workaround we can install the dependency from local with `yarn add ../collect-lib`.
24
24
  This will install the library from the local source as a full copy, allowing each `yarn` call to get the recent build.
25
25
  From there we can cheat the system by opening the `collect-lib` from inside the `node_modules` of `phoenix` to then working in there.
26
26
  Then run `yarn start` to watch changes in the lib and build each time, which should then be picked up by the running UA.
package/dist/index.d.mts CHANGED
@@ -365,7 +365,7 @@ type DEVICE_KEY_INTERNAL = 'INTERNAL' | 'internal_accelerometer' | 'internal_gyr
365
365
  type DEVICE_MOVELLA_PAYLOAD_MODES = 'completeEuler' | 'customMode1' | 'rateQuantities';
366
366
  type DEVICE_SIGNAL_TYPE = 'heartRate' | 'imu' | 'beacon' | 'beaconUWB' | 'beaconRemoteUWB' | 'rssiScan' | 'physicalActivityMonitoring' | 'customPassiveMonitoring' | 'activeSamsungSDKMonitoring' | 'passiveSamsungSDKMonitoring' | 'accelerometer' | 'gyroscope' | 'magnetometer' | 'egvs' | 'heartRateVariability' | 'respiratoryRate' | 'steps' | 'calories' | 'sleep' | 'skinTemperature' | 'spo2' | 'stepCount' | 'walkingAndRunningDistance' | 'activeEnergy' | 'restingEnergy';
367
367
 
368
- declare const RECORDING_SIGNAL_MODEL_CURRENT_VERSION = "0.0.8";
368
+ declare const RECORDING_SIGNAL_MODEL_CURRENT_VERSION = "1.0.0";
369
369
  interface RecordingSignalItem {
370
370
  date: Date;
371
371
  value: Uint8Array;
@@ -395,7 +395,7 @@ interface RecordingSignal {
395
395
  outputRate?: number;
396
396
  sensorDelay?: number;
397
397
  type?: DEVICE_SIGNAL_TYPE;
398
- items?: RecordingSignalItem[];
398
+ data?: ArrayBuffer;
399
399
  }
400
400
 
401
401
  /**
package/dist/index.d.ts CHANGED
@@ -365,7 +365,7 @@ type DEVICE_KEY_INTERNAL = 'INTERNAL' | 'internal_accelerometer' | 'internal_gyr
365
365
  type DEVICE_MOVELLA_PAYLOAD_MODES = 'completeEuler' | 'customMode1' | 'rateQuantities';
366
366
  type DEVICE_SIGNAL_TYPE = 'heartRate' | 'imu' | 'beacon' | 'beaconUWB' | 'beaconRemoteUWB' | 'rssiScan' | 'physicalActivityMonitoring' | 'customPassiveMonitoring' | 'activeSamsungSDKMonitoring' | 'passiveSamsungSDKMonitoring' | 'accelerometer' | 'gyroscope' | 'magnetometer' | 'egvs' | 'heartRateVariability' | 'respiratoryRate' | 'steps' | 'calories' | 'sleep' | 'skinTemperature' | 'spo2' | 'stepCount' | 'walkingAndRunningDistance' | 'activeEnergy' | 'restingEnergy';
367
367
 
368
- declare const RECORDING_SIGNAL_MODEL_CURRENT_VERSION = "0.0.8";
368
+ declare const RECORDING_SIGNAL_MODEL_CURRENT_VERSION = "1.0.0";
369
369
  interface RecordingSignalItem {
370
370
  date: Date;
371
371
  value: Uint8Array;
@@ -395,7 +395,7 @@ interface RecordingSignal {
395
395
  outputRate?: number;
396
396
  sensorDelay?: number;
397
397
  type?: DEVICE_SIGNAL_TYPE;
398
- items?: RecordingSignalItem[];
398
+ data?: ArrayBuffer;
399
399
  }
400
400
 
401
401
  /**
package/dist/index.js CHANGED
@@ -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
  var _utils = require('@noble/curves/abstract/utils'); var secpUtils = _interopRequireWildcard(_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 = _2.Buffer.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",