@flomentumsolutions/capacitor-health-extended 0.7.3 → 0.7.4

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.
@@ -892,9 +892,17 @@ public class HealthPlugin: CAPPlugin, CAPBridgedPlugin {
892
892
  return [HKObjectType.quantityType(forIdentifier: .heartRate)].compactMap { $0 as? HKSampleType }
893
893
  case "WRITE_ROUTE":
894
894
  return [HKSeriesType.workoutRoute()].compactMap { $0 as? HKSampleType }
895
+ case "WRITE_WEIGHT":
896
+ return [HKObjectType.quantityType(forIdentifier: .bodyMass)].compactMap { $0 as? HKSampleType }
897
+ case "WRITE_HEIGHT":
898
+ return [HKObjectType.quantityType(forIdentifier: .height)].compactMap { $0 as? HKSampleType }
899
+ case "WRITE_BODY_FAT":
900
+ return [HKObjectType.quantityType(forIdentifier: .bodyFatPercentage)].compactMap { $0 as? HKSampleType }
901
+ case "WRITE_RESTING_HEART_RATE":
902
+ return [HKObjectType.quantityType(forIdentifier: .restingHeartRate)].compactMap { $0 as? HKSampleType }
895
903
  default:
896
- // For convenience, allow read permissions that are sample types to be added to the share set when requested.
897
- return permissionToHKObjectType(permission).compactMap { $0 as? HKSampleType }
904
+ // Avoid requesting write/share authorization when only read permissions are supplied.
905
+ return []
898
906
  }
899
907
  }
900
908
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flomentumsolutions/capacitor-health-extended",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "Capacitor plugin for Apple HealthKit and Google Health Connect Platform",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",