@d4l/collect-lib 1.33.3 → 1.34.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.d.mts CHANGED
@@ -452,7 +452,7 @@ type ResponseValue = {
452
452
  type ResponseContext = {
453
453
  [key: string]: string;
454
454
  };
455
- type QuestionInputType = 'decimal' | 'date' | 'year' | 'single-select' | 'multi-select' | 'scale-ordinal' | 'scale-numeric' | 'string' | 'text' | 'geo-location' | 'list' | 'country' | 'postal-code' | 'group' | 'display' | 'matrix' | 'matrix_item';
455
+ type QuestionInputType = 'decimal' | 'date' | 'year' | 'single-select' | 'multi-select' | 'scale-ordinal' | 'scale-numeric' | 'string' | 'text' | 'geo-location' | 'list' | 'country' | 'postal-code' | 'group' | 'display' | 'matrix' | 'matrix-item' | 'likert-scale';
456
456
 
457
457
  type DEVICE_ANNOTATION_DATA_TYPE = 'header' | 'flag' | 'any' | 'timestamp' | 'heartRate' | 'eulerAngles' | 'acceleration' | 'freeAcceleration' | 'angularSpeed' | 'angularVelocity' | 'magneticField' | 'distance' | 'remoteDistance' | 'rssi' | 'beaconId' | 'caloriesTotal' | 'distanceTotal' | 'speed' | 'motionCadence' | 'floorsTotal' | 'absoluteElevation' | 'positiveElevationTotal' | 'negativeElevationTotal' | 'minSpeed' | 'maxSpeed' | 'averageSpeed' | 'minMotionCadence' | 'maxMotionCadence' | 'averageMotionCadence' | 'vo2max' | 'stepsTotal' | 'runningStepsTotal' | 'dailySteps' | 'dailyDistance' | 'dailyCalories' | 'dailyFloors' | 'dailyElevationGain' | 'activityDetection' | 'egvs' | 'ecg' | 'spo2' | 'samsungSdkHeartRate' | 'interbeatInterval' | 'ppgGreen' | 'ppgRed' | 'ppgInfrared' | 'skinTemperature' | 'sleepLevel' | 'duration' | 'respiratoryRate' | 'hrv' | 'calories' | 'steps' | 'stepCount' | 'walkingAndRunningDistance' | 'activeEnergy' | 'sleepState' | 'sleepStage' | 'dataSource' | 'normalWalkingEnergyExpenditure' | 'normalWalkingEnergyExpenditurePerHour' | 'intensityEnergyExpenditure' | 'intensityEnergyExpenditurePerHour' | 'totalEnergyExpenditurePerHour' | 'fatBurned' | 'fatBurnedPerHour' | 'metabolicEquivalent' | 'minimumMetabolicEquivalent' | 'maximumMetabolicEquivalent' | 'averageMetabolicEquivalent' | 'durationOfNormalWalkingEpisodes' | 'durationOfIntensityWalkingEpisodes';
458
458
  type DEVICE_ANNOTATION_DATA_FORMAT = 'bitmask' | 'boolean' | 'unsignedInt' | 'signedInt' | 'signedBigInt' | 'float32' | 'float64' | 'byte';
package/dist/index.d.ts CHANGED
@@ -452,7 +452,7 @@ type ResponseValue = {
452
452
  type ResponseContext = {
453
453
  [key: string]: string;
454
454
  };
455
- type QuestionInputType = 'decimal' | 'date' | 'year' | 'single-select' | 'multi-select' | 'scale-ordinal' | 'scale-numeric' | 'string' | 'text' | 'geo-location' | 'list' | 'country' | 'postal-code' | 'group' | 'display' | 'matrix' | 'matrix_item';
455
+ type QuestionInputType = 'decimal' | 'date' | 'year' | 'single-select' | 'multi-select' | 'scale-ordinal' | 'scale-numeric' | 'string' | 'text' | 'geo-location' | 'list' | 'country' | 'postal-code' | 'group' | 'display' | 'matrix' | 'matrix-item' | 'likert-scale';
456
456
 
457
457
  type DEVICE_ANNOTATION_DATA_TYPE = 'header' | 'flag' | 'any' | 'timestamp' | 'heartRate' | 'eulerAngles' | 'acceleration' | 'freeAcceleration' | 'angularSpeed' | 'angularVelocity' | 'magneticField' | 'distance' | 'remoteDistance' | 'rssi' | 'beaconId' | 'caloriesTotal' | 'distanceTotal' | 'speed' | 'motionCadence' | 'floorsTotal' | 'absoluteElevation' | 'positiveElevationTotal' | 'negativeElevationTotal' | 'minSpeed' | 'maxSpeed' | 'averageSpeed' | 'minMotionCadence' | 'maxMotionCadence' | 'averageMotionCadence' | 'vo2max' | 'stepsTotal' | 'runningStepsTotal' | 'dailySteps' | 'dailyDistance' | 'dailyCalories' | 'dailyFloors' | 'dailyElevationGain' | 'activityDetection' | 'egvs' | 'ecg' | 'spo2' | 'samsungSdkHeartRate' | 'interbeatInterval' | 'ppgGreen' | 'ppgRed' | 'ppgInfrared' | 'skinTemperature' | 'sleepLevel' | 'duration' | 'respiratoryRate' | 'hrv' | 'calories' | 'steps' | 'stepCount' | 'walkingAndRunningDistance' | 'activeEnergy' | 'sleepState' | 'sleepStage' | 'dataSource' | 'normalWalkingEnergyExpenditure' | 'normalWalkingEnergyExpenditurePerHour' | 'intensityEnergyExpenditure' | 'intensityEnergyExpenditurePerHour' | 'totalEnergyExpenditurePerHour' | 'fatBurned' | 'fatBurnedPerHour' | 'metabolicEquivalent' | 'minimumMetabolicEquivalent' | 'maximumMetabolicEquivalent' | 'averageMetabolicEquivalent' | 'durationOfNormalWalkingEpisodes' | 'durationOfIntensityWalkingEpisodes';
458
458
  type DEVICE_ANNOTATION_DATA_FORMAT = 'bitmask' | 'boolean' | 'unsignedInt' | 'signedInt' | 'signedBigInt' | 'float32' | 'float64' | 'byte';
package/dist/index.js CHANGED
@@ -1210,10 +1210,13 @@ var toQuestionnaireResponseItem = (answer) => {
1210
1210
  answer: createAnswer(answer.response, (response) => ({ valueDate: response.value }))
1211
1211
  };
1212
1212
  case "decimal":
1213
+ case "scale-numeric":
1213
1214
  return {
1214
1215
  linkId: answer.id,
1215
1216
  text: answer.text,
1216
- answer: createAnswer(answer.response, (response) => ({ valueDecimal: Number(response.value) }))
1217
+ answer: createAnswer(answer.response, (response) => ({
1218
+ valueDecimal: Number(response.value)
1219
+ }))
1217
1220
  };
1218
1221
  case "year":
1219
1222
  return {
@@ -1227,7 +1230,7 @@ var toQuestionnaireResponseItem = (answer) => {
1227
1230
  text: answer.text,
1228
1231
  item: answer.items.map(toQuestionnaireResponseItem)
1229
1232
  };
1230
- case "matrix_item":
1233
+ case "matrix-item":
1231
1234
  case "single-select":
1232
1235
  case "country":
1233
1236
  return {
@@ -1242,11 +1245,13 @@ var toQuestionnaireResponseItem = (answer) => {
1242
1245
  }))
1243
1246
  };
1244
1247
  case "scale-ordinal":
1245
- case "scale-numeric":
1248
+ case "likert-scale":
1246
1249
  return {
1247
1250
  linkId: answer.id,
1248
1251
  text: answer.text,
1249
- answer: createAnswer(answer.response, (response) => ({ valueInteger: Number(response.value) }))
1252
+ answer: createAnswer(answer.response, (response) => ({
1253
+ valueInteger: Number(response.value)
1254
+ }))
1250
1255
  };
1251
1256
  case "string":
1252
1257
  case "text":