@kingstinct/react-native-healthkit 7.0.3 → 7.0.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.
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # @kingstinct/react-native-healthkit
2
2
 
3
- [![Test](https://github.com/Kingstinct/react-native-healthkit/actions/workflows/test.yml/badge.svg)](https://github.com/Kingstinct/react-native-healthkit/actions/workflows/test.yml)
4
- [![@kingstinct/react-native-healthkit on NPM](https://img.shields.io/npm/v/@kingstinct/react-native-healthkit)](https://www.npmjs.com/package/@kingstinct/react-native-healthkit)
5
- ![npm](https://img.shields.io/npm/dt/@kingstinct/react-native-healthkit)
3
+ [![Test Status](https://github.com/Kingstinct/react-native-healthkit/actions/workflows/test.yml/badge.svg)](https://github.com/Kingstinct/react-native-healthkit/actions/workflows/test.yml)
4
+ [![Latest version on NPM](https://img.shields.io/npm/v/@kingstinct/react-native-healthkit)](https://www.npmjs.com/package/@kingstinct/react-native-healthkit)
5
+ [![Downloads on NPM](https://img.shields.io/npm/dt/@kingstinct/react-native-healthkit)](https://www.npmjs.com/package/@kingstinct/react-native-healthkit)
6
+ [![Discord](https://dcbadge.vercel.app/api/server/EHScS93v?style=flat)](https://discord.gg/EHScS93v)
7
+
6
8
 
7
9
  React Native bindings for HealthKit with full TypeScript and Promise support covering about any kind of data. Keeping TypeScript mappings as close as possible to HealthKit - both in regards to naming and serialization. This will make it easier to keep this library up-to-date with HealthKit as well as browsing [the official documentation](https://developer.apple.com/documentation/healthkit) (and if something - metadata properties for example - is not typed it will still be accessible).
8
10
 
@@ -13,7 +15,7 @@ React Native bindings for HealthKit with full TypeScript and Promise support cov
13
15
  | 75+ Workout Activity Types | ✅ | ✅ | ✅ | Swimming, running, table tennis etc.. |
14
16
  | Correlation Types | ✅ | ✅ | ✅ | Food and blood pressure |
15
17
  | Document Types | ✅ | ❌ | ✅ | [CDA documents](https://developer.apple.com/documentation/healthkit/hkcdadocument) exposed as Base64 data |
16
- | Clinical Records | ⚠️ | ❌ | ⚠️ | Lab results etc in [FHIR JSON format](https://www.hl7.org/fhir/json.html) |
18
+ | Clinical Records | ⚠️ | ❌ | ⚠️ | Lab results etc in [FHIR JSON format](https://www.hl7.org/fhir/json.html) (see [Clinical Records](https://github.com/kingstinct/react-native-healthkit#clinical-records)) |
17
19
 
18
20
  ### Disclaimer
19
21
 
@@ -159,7 +161,7 @@ We're striving to do as straight a mapping as possible to the Native Libraries.
159
161
 
160
162
  ## Clinical Records
161
163
 
162
- For accessing Clinical Records use old version (3.x) or use specific branch "including-clinical-records"
164
+ For accessing Clinical Records use old version (3.x) or use specific branch "including-clinical-records". The reason is we cannot refer to this code natively in apps without getting approval from Apple, this could probably be solved by the config plugin but we haven't had time to look into it yet.
163
165
 
164
166
  ## Android alternatives
165
167
 
@@ -178,7 +178,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
178
178
  }
179
179
 
180
180
  guard let objectType = objectTypeFromString(typeIdentifier: typeIdentifier) else {
181
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
181
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
182
182
  }
183
183
 
184
184
  let authStatus = store.authorizationStatus(for: objectType)
@@ -194,7 +194,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
194
194
  let identifier = HKQuantityTypeIdentifier.init(rawValue: typeIdentifier)
195
195
 
196
196
  guard let type = HKObjectType.quantityType(forIdentifier: identifier) else {
197
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
197
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
198
198
  }
199
199
 
200
200
  let unit = HKUnit.init(from: unitString)
@@ -225,7 +225,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
225
225
  let sampleUuid = UUID.init(uuidString: uuid)!
226
226
 
227
227
  guard let sampleType = HKObjectType.quantityType(forIdentifier: identifier) else {
228
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
228
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
229
229
  }
230
230
 
231
231
  let samplePredicate = HKQuery.predicateForObject(with: sampleUuid)
@@ -247,7 +247,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
247
247
  let identifier = HKQuantityTypeIdentifier.init(rawValue: typeIdentifier)
248
248
 
249
249
  guard let sampleType = HKObjectType.quantityType(forIdentifier: identifier) else {
250
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
250
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
251
251
  }
252
252
 
253
253
  let samplePredicate = HKQuery.predicateForSamples(withStart: start, end: end, options: HKQueryOptions.strictStartDate)
@@ -269,7 +269,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
269
269
  let identifier = HKCorrelationTypeIdentifier.init(rawValue: typeIdentifier)
270
270
 
271
271
  guard let type = HKObjectType.correlationType(forIdentifier: identifier) else {
272
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
272
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
273
273
  }
274
274
 
275
275
  var initializedSamples = Set<HKSample>()
@@ -316,7 +316,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
316
316
  }
317
317
 
318
318
  guard let type = HKWorkoutActivityType.init(rawValue: typeIdentifier) else {
319
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier.description, nil)
319
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize HKWorkoutActivityType " + typeIdentifier.description, nil)
320
320
  }
321
321
 
322
322
  var initializedSamples = [HKSample]()
@@ -394,7 +394,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
394
394
  let identifier = HKCategoryTypeIdentifier.init(rawValue: typeIdentifier)
395
395
 
396
396
  guard let type = HKObjectType.categoryType(forIdentifier: identifier) else {
397
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
397
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
398
398
  }
399
399
 
400
400
  let sample = HKCategorySample.init(type: type, value: Int(value), start: start, end: end, metadata: metadata as? [String: Any])
@@ -418,7 +418,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
418
418
  }
419
419
 
420
420
  guard let sampleType = objectTypeFromString(typeIdentifier: typeIdentifier) else {
421
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
421
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
422
422
  }
423
423
 
424
424
  guard let frequency = HKUpdateFrequency.init(rawValue: updateFrequency) else {
@@ -454,7 +454,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
454
454
  }
455
455
 
456
456
  guard let sampleType = objectTypeFromString(typeIdentifier: typeIdentifier) else {
457
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
457
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
458
458
  }
459
459
 
460
460
  store.disableBackgroundDelivery(for: sampleType) { (success, error) in
@@ -472,7 +472,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
472
472
  }
473
473
 
474
474
  guard let sampleType = sampleTypeFromString(typeIdentifier: typeIdentifier) else {
475
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
475
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
476
476
  }
477
477
 
478
478
  let predicate = HKQuery.predicateForSamples(withStart: Date.init(), end: nil, options: HKQueryOptions.strictStartDate)
@@ -535,7 +535,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
535
535
 
536
536
  let identifier = HKQuantityTypeIdentifier.init(rawValue: typeIdentifier)
537
537
  guard let quantityType = HKObjectType.quantityType(forIdentifier: identifier) else {
538
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
538
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
539
539
  }
540
540
 
541
541
  let predicate = HKQuery.predicateForSamples(withStart: from, end: to, options: HKQueryOptions.strictEndDate)
@@ -689,7 +689,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
689
689
 
690
690
  let identifier = HKQuantityTypeIdentifier.init(rawValue: typeIdentifier)
691
691
  guard let sampleType = HKSampleType.quantityType(forIdentifier: identifier) else {
692
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
692
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
693
693
  }
694
694
 
695
695
  let from = dateOrNilIfZero(date: from)
@@ -728,7 +728,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
728
728
 
729
729
  let identifier = HKCorrelationTypeIdentifier.init(rawValue: typeIdentifier)
730
730
  guard let sampleType = HKSampleType.correlationType(forIdentifier: identifier) else {
731
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
731
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
732
732
  }
733
733
 
734
734
  let from = from.timeIntervalSince1970 >= 0 ? from : nil
@@ -794,7 +794,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
794
794
 
795
795
  let identifier = HKCategoryTypeIdentifier.init(rawValue: typeIdentifier)
796
796
  guard let sampleType = HKSampleType.categoryType(forIdentifier: identifier) else {
797
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
797
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
798
798
  }
799
799
 
800
800
  let from = dateOrNilIfZero(date: from)
@@ -842,7 +842,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
842
842
 
843
843
  let identifier = HKQuantityTypeIdentifier.init(rawValue: typeIdentifier)
844
844
  guard let sampleType = HKSampleType.quantityType(forIdentifier: identifier) else {
845
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
845
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
846
846
  }
847
847
 
848
848
  let from = dateOrNilIfZero(date: from)
@@ -895,7 +895,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
895
895
 
896
896
  let identifier = HKCategoryTypeIdentifier.init(rawValue: typeIdentifier)
897
897
  guard let sampleType = HKSampleType.categoryType(forIdentifier: identifier) else {
898
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
898
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
899
899
  }
900
900
 
901
901
  let from = dateOrNilIfZero(date: from)
@@ -952,7 +952,7 @@ class ReactNativeHealthkit: RCTEventEmitter {
952
952
  }
953
953
 
954
954
  guard let type = objectTypeFromString(typeIdentifier: typeIdentifier) else {
955
- return reject(TYPE_IDENTIFIER_ERROR, typeIdentifier, nil)
955
+ return reject(TYPE_IDENTIFIER_ERROR, "Failed to initialize " + typeIdentifier, nil)
956
956
  }
957
957
 
958
958
  let query = HKSourceQuery(sampleType: type as! HKSampleType, samplePredicate: nil) { (_: HKSourceQuery, source: Set<HKSource>?, error: Error?) in
@@ -128,8 +128,10 @@ let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdentifier)
128
128
  HKQuantityTypeIdentifier["cyclingPower"] = "HKQuantityTypeIdentifierCyclingPower";
129
129
  HKQuantityTypeIdentifier["cyclingFunctionalThresholdPower"] = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower";
130
130
  HKQuantityTypeIdentifier["cyclingCadence"] = "HKQuantityTypeIdentifierCyclingCadence";
131
+ HKQuantityTypeIdentifier["environmentalSoundReduction"] = "HKQuantityTypeIdentifierEnvironmentalSoundReduction";
132
+ HKQuantityTypeIdentifier["heartRateRecoveryOneMinute"] = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute";
131
133
  return HKQuantityTypeIdentifier;
132
- }({}); // Scalar(Count)/Time, Discrete
134
+ }({});
133
135
  exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier;
134
136
  let HKCategoryValueLowCardioFitnessEvent = /*#__PURE__*/function (HKCategoryValueLowCardioFitnessEvent) {
135
137
  HKCategoryValueLowCardioFitnessEvent[HKCategoryValueLowCardioFitnessEvent["lowFitness"] = 1] = "lowFitness";
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed', // Length/Time, Discrete\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower', // Power, Discrete\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower', // Power, Discrete\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence', // Scalar(Count)/Time, Discrete\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* <TTemperatureUnit extends HKUnit> */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity<TTemperatureUnit>\n readonly HKAverageMETs?: HKQuantity<HKQuantityTypeIdentifier, HKUnit>;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier> = UnitForIdentifier<TIdentifier>\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n> = {\n readonly averageQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly maximumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly minimumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly sumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly mostRecentQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity<HKQuantityTypeIdentifier, TimeUnit>;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier<T extends HKQuantityTypeIdentifier> =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit<LengthUnit, TimeUnit>\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime<TimeUnit>\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier<T extends HKCategoryTypeIdentifier> =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit<MolarMass extends number> = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit<HKMetricPrefix>;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit<HKMetricPrefix> | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit<HKMetricPrefix> | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit<HKMetricPrefix> | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit<HKMetricPrefix> | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit<HKMetricPrefix> | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit<HKMetricPrefix> | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime<TTime extends TimeUnit> = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime<TimeUnit>\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit<LengthUnit, TimeUnit>\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TQuantityIdentifier> = UnitForIdentifier<TQuantityIdentifier>\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TQuantityIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata: MetadataMapperForQuantityIdentifier<TQuantityIdentifier>;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TQuantityIdentifier> = UnitForIdentifier<TQuantityIdentifier>\n> = Omit<\nHKQuantitySampleRaw<TQuantityIdentifier, TUnit>,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw<TCategory>,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity<HKQuantityTypeIdentifier, TDistance>;\n readonly totalEnergyBurned?: HKQuantity<HKQuantityTypeIdentifier, TEnergy>;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier<T>;\n readonly metadata: MetadataMapperForCategoryIdentifier<T>;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw<T extends HKCategoryTypeIdentifier> = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier<T>\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw<T extends HKQuantityTypeIdentifier> = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier<T>\n}\n\nexport type QueryCategorySamplesResponseRaw<T extends HKCategoryTypeIdentifier> = {\n readonly samples: readonly HKCategorySampleRaw<T>[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw<T>[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw<T extends HKQuantityTypeIdentifier> = {\n readonly samples: readonly HKQuantitySampleRaw<T>[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw<T>[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw<TIdentifier extends HKCorrelationTypeIdentifier> =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise<boolean>;\n canAccessProtectedData(): Promise<boolean>;\n getBloodType(): Promise<HKBloodType>;\n getDateOfBirth(): Promise<string>;\n getBiologicalSex(): Promise<HKBiologicalSex>;\n getFitzpatrickSkinType(): Promise<HKFitzpatrickSkinType>;\n readonly getWheelchairUse: () => Promise<HKWheelchairUse>;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise<boolean>;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise<boolean>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise<boolean>;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>\n ) => Promise<boolean>;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise<boolean>;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise<readonly HKCorrelationRaw<TIdentifier>[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise<QueryId>;\n unsubscribeQuery(queryId: QueryId): Promise<boolean>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise<HKAuthorizationStatus>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise<HKAuthorizationRequestStatus>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise<boolean>;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TType> = UnitForIdentifier<TType>\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise<boolean>;\n readonly deleteQuantitySample: <TIdentifier extends HKQuantityTypeIdentifier>(\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise<boolean>;\n readonly deleteSamples: <TIdentifier extends HKQuantityTypeIdentifier>(\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise<boolean>;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise<readonly HKWorkoutRaw<TEnergy, TDistance>[]>;\n readonly queryCategorySamples: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKCategorySampleRaw<T>[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKQuantitySampleRaw<TIdentifier>[]>;\n readonly queryCategorySamplesWithAnchor: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryCategorySamplesResponseRaw<T>>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryQuantitySamplesResponseRaw<TIdentifier>>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKHeartbeatSeriesSampleRaw[]>;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryHeartbeatSeriesSamplesResponseRaw>;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise<readonly HKSource[]>;\n readonly saveCategorySample: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n value: HKCategoryValueForIdentifier<T>,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise<boolean>;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise<QueryStatisticsResponseRaw<TIdentifier, TUnit>>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise<TypeToUnitMapping>;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise<readonly WorkoutRoute[]>;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;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A,GAAAA,YAAA;AAAA,IAAAE,QAAA,GAEXL,MAAM;AAAA3C,OAAA,CAAAiD,OAAA,GAAAD,QAAA"}
1
+ {"version":3,"names":["_reactNative","require","HKWorkoutTypeIdentifier","exports","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter","_default","default"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* <TTemperatureUnit extends HKUnit> */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity<TTemperatureUnit>\n readonly HKAverageMETs?: HKQuantity<HKQuantityTypeIdentifier, HKUnit>;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier> = UnitForIdentifier<TIdentifier>\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n> = {\n readonly averageQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly maximumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly minimumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly sumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly mostRecentQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity<HKQuantityTypeIdentifier, TimeUnit>;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier<T extends HKQuantityTypeIdentifier> =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit<LengthUnit, TimeUnit>\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime<TimeUnit>\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier<T extends HKCategoryTypeIdentifier> =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit<MolarMass extends number> = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit<HKMetricPrefix>;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit<HKMetricPrefix> | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit<HKMetricPrefix> | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit<HKMetricPrefix> | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit<HKMetricPrefix> | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit<HKMetricPrefix> | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit<HKMetricPrefix> | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime<TTime extends TimeUnit> = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime<TimeUnit>\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit<LengthUnit, TimeUnit>\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TQuantityIdentifier> = UnitForIdentifier<TQuantityIdentifier>\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TQuantityIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata: MetadataMapperForQuantityIdentifier<TQuantityIdentifier>;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TQuantityIdentifier> = UnitForIdentifier<TQuantityIdentifier>\n> = Omit<\nHKQuantitySampleRaw<TQuantityIdentifier, TUnit>,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw<TCategory>,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity<HKQuantityTypeIdentifier, TDistance>;\n readonly totalEnergyBurned?: HKQuantity<HKQuantityTypeIdentifier, TEnergy>;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier<T>;\n readonly metadata: MetadataMapperForCategoryIdentifier<T>;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw<T extends HKCategoryTypeIdentifier> = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier<T>\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw<T extends HKQuantityTypeIdentifier> = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier<T>\n}\n\nexport type QueryCategorySamplesResponseRaw<T extends HKCategoryTypeIdentifier> = {\n readonly samples: readonly HKCategorySampleRaw<T>[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw<T>[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw<T extends HKQuantityTypeIdentifier> = {\n readonly samples: readonly HKQuantitySampleRaw<T>[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw<T>[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw<TIdentifier extends HKCorrelationTypeIdentifier> =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise<boolean>;\n canAccessProtectedData(): Promise<boolean>;\n getBloodType(): Promise<HKBloodType>;\n getDateOfBirth(): Promise<string>;\n getBiologicalSex(): Promise<HKBiologicalSex>;\n getFitzpatrickSkinType(): Promise<HKFitzpatrickSkinType>;\n readonly getWheelchairUse: () => Promise<HKWheelchairUse>;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise<boolean>;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise<boolean>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise<boolean>;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>\n ) => Promise<boolean>;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise<boolean>;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise<readonly HKCorrelationRaw<TIdentifier>[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise<QueryId>;\n unsubscribeQuery(queryId: QueryId): Promise<boolean>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise<HKAuthorizationStatus>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise<HKAuthorizationRequestStatus>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise<boolean>;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TType> = UnitForIdentifier<TType>\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise<boolean>;\n readonly deleteQuantitySample: <TIdentifier extends HKQuantityTypeIdentifier>(\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise<boolean>;\n readonly deleteSamples: <TIdentifier extends HKQuantityTypeIdentifier>(\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise<boolean>;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise<readonly HKWorkoutRaw<TEnergy, TDistance>[]>;\n readonly queryCategorySamples: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKCategorySampleRaw<T>[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKQuantitySampleRaw<TIdentifier>[]>;\n readonly queryCategorySamplesWithAnchor: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryCategorySamplesResponseRaw<T>>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryQuantitySamplesResponseRaw<TIdentifier>>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKHeartbeatSeriesSampleRaw[]>;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryHeartbeatSeriesSamplesResponseRaw>;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise<readonly HKSource[]>;\n readonly saveCategorySample: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n value: HKCategoryValueForIdentifier<T>,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise<boolean>;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise<QueryStatisticsResponseRaw<TIdentifier, TUnit>>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise<TypeToUnitMapping>;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise<readonly WorkoutRoute[]>;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,yBAAkC;AAAAC,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAClE,MAAME,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AAFAD,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAGO,MAAMC,4BAA4B,GAAG,8BAAuC;AAAAF,OAAA,CAAAE,4BAAA,GAAAA,4BAAA;AAC5E,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AAFAH,OAAA,CAAAG,mCAAA,GAAAA,mCAAA;AAAA,IAGYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAw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AAD,QAAA"}
@@ -118,8 +118,10 @@ export let HKQuantityTypeIdentifier = /*#__PURE__*/function (HKQuantityTypeIdent
118
118
  HKQuantityTypeIdentifier["cyclingPower"] = "HKQuantityTypeIdentifierCyclingPower";
119
119
  HKQuantityTypeIdentifier["cyclingFunctionalThresholdPower"] = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower";
120
120
  HKQuantityTypeIdentifier["cyclingCadence"] = "HKQuantityTypeIdentifierCyclingCadence";
121
+ HKQuantityTypeIdentifier["environmentalSoundReduction"] = "HKQuantityTypeIdentifierEnvironmentalSoundReduction";
122
+ HKQuantityTypeIdentifier["heartRateRecoveryOneMinute"] = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute";
121
123
  return HKQuantityTypeIdentifier;
122
- }({}); // Scalar(Count)/Time, Discrete
124
+ }({});
123
125
  export let HKCategoryValueLowCardioFitnessEvent = /*#__PURE__*/function (HKCategoryValueLowCardioFitnessEvent) {
124
126
  HKCategoryValueLowCardioFitnessEvent[HKCategoryValueLowCardioFitnessEvent["lowFitness"] = 1] = "lowFitness";
125
127
  return HKCategoryValueLowCardioFitnessEvent;
@@ -1 +1 @@
1
- {"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed', // Length/Time, Discrete\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower', // Power, Discrete\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower', // Power, Discrete\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence', // Scalar(Count)/Time, Discrete\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* <TTemperatureUnit extends HKUnit> */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity<TTemperatureUnit>\n readonly HKAverageMETs?: HKQuantity<HKQuantityTypeIdentifier, HKUnit>;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier> = UnitForIdentifier<TIdentifier>\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n> = {\n readonly averageQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly maximumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly minimumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly sumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly mostRecentQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity<HKQuantityTypeIdentifier, TimeUnit>;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier<T extends HKQuantityTypeIdentifier> =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit<LengthUnit, TimeUnit>\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime<TimeUnit>\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier<T extends HKCategoryTypeIdentifier> =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit<MolarMass extends number> = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit<HKMetricPrefix>;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit<HKMetricPrefix> | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit<HKMetricPrefix> | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit<HKMetricPrefix> | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit<HKMetricPrefix> | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit<HKMetricPrefix> | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit<HKMetricPrefix> | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime<TTime extends TimeUnit> = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime<TimeUnit>\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit<LengthUnit, TimeUnit>\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TQuantityIdentifier> = UnitForIdentifier<TQuantityIdentifier>\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TQuantityIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata: MetadataMapperForQuantityIdentifier<TQuantityIdentifier>;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TQuantityIdentifier> = UnitForIdentifier<TQuantityIdentifier>\n> = Omit<\nHKQuantitySampleRaw<TQuantityIdentifier, TUnit>,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw<TCategory>,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity<HKQuantityTypeIdentifier, TDistance>;\n readonly totalEnergyBurned?: HKQuantity<HKQuantityTypeIdentifier, TEnergy>;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier<T>;\n readonly metadata: MetadataMapperForCategoryIdentifier<T>;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw<T extends HKCategoryTypeIdentifier> = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier<T>\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw<T extends HKQuantityTypeIdentifier> = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier<T>\n}\n\nexport type QueryCategorySamplesResponseRaw<T extends HKCategoryTypeIdentifier> = {\n readonly samples: readonly HKCategorySampleRaw<T>[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw<T>[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw<T extends HKQuantityTypeIdentifier> = {\n readonly samples: readonly HKQuantitySampleRaw<T>[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw<T>[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw<TIdentifier extends HKCorrelationTypeIdentifier> =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise<boolean>;\n canAccessProtectedData(): Promise<boolean>;\n getBloodType(): Promise<HKBloodType>;\n getDateOfBirth(): Promise<string>;\n getBiologicalSex(): Promise<HKBiologicalSex>;\n getFitzpatrickSkinType(): Promise<HKFitzpatrickSkinType>;\n readonly getWheelchairUse: () => Promise<HKWheelchairUse>;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise<boolean>;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise<boolean>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise<boolean>;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>\n ) => Promise<boolean>;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise<boolean>;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise<readonly HKCorrelationRaw<TIdentifier>[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise<QueryId>;\n unsubscribeQuery(queryId: QueryId): Promise<boolean>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise<HKAuthorizationStatus>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise<HKAuthorizationRequestStatus>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise<boolean>;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TType> = UnitForIdentifier<TType>\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise<boolean>;\n readonly deleteQuantitySample: <TIdentifier extends HKQuantityTypeIdentifier>(\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise<boolean>;\n readonly deleteSamples: <TIdentifier extends HKQuantityTypeIdentifier>(\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise<boolean>;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise<readonly HKWorkoutRaw<TEnergy, TDistance>[]>;\n readonly queryCategorySamples: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKCategorySampleRaw<T>[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKQuantitySampleRaw<TIdentifier>[]>;\n readonly queryCategorySamplesWithAnchor: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryCategorySamplesResponseRaw<T>>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryQuantitySamplesResponseRaw<TIdentifier>>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKHeartbeatSeriesSampleRaw[]>;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryHeartbeatSeriesSamplesResponseRaw>;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise<readonly HKSource[]>;\n readonly saveCategorySample: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n value: HKCategoryValueForIdentifier<T>,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise<boolean>;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise<QueryStatisticsResponseRaw<TIdentifier, TUnit>>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise<TypeToUnitMapping>;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise<readonly WorkoutRoute[]>;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAIhE;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,w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1
+ {"version":3,"names":["NativeEventEmitter","NativeModules","HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKCategoryValueLowCardioFitnessEvent","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKIndoorWorkout","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKCategoryValuePregnancyTestResult","HKWheelchairUse","HKMetricPrefix","HKUnitMetric","HKUnits","UnitOfLength","UnitOfVolume","UnitOfMass","UnitOfPressure","UnitOfTime","TemperatureUnit","UnitOfEnergy","BloodGlucoseUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","Native","ReactNativeHealthkit","EventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import { NativeEventEmitter, NativeModules, Platform } from 'react-native'\n\nimport type { EmitterSubscription, NativeModule } from 'react-native'\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkouttypeidentifier\n */\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkworkoutroutetypeidentifier\n */\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\n */\nexport enum HKQuantityTypeIdentifier {\n bodyMassIndex = 'HKQuantityTypeIdentifierBodyMassIndex',\n bodyFatPercentage = 'HKQuantityTypeIdentifierBodyFatPercentage', // Scalar(Percent, 0.0 - 1.0), Discrete\n height = 'HKQuantityTypeIdentifierHeight', // Length, Discrete\n bodyMass = 'HKQuantityTypeIdentifierBodyMass', // Mass, Discrete\n leanBodyMass = 'HKQuantityTypeIdentifierLeanBodyMass', // Mass, Discrete\n\n waistCircumference = 'HKQuantityTypeIdentifierWaistCircumference', // Length, Discrete\n // Fitness\n stepCount = 'HKQuantityTypeIdentifierStepCount', // Scalar(Count), Cumulative\n distanceWalkingRunning = 'HKQuantityTypeIdentifierDistanceWalkingRunning', // Length, Cumulative\n distanceCycling = 'HKQuantityTypeIdentifierDistanceCycling', // Length, Cumulative\n distanceWheelchair = 'HKQuantityTypeIdentifierDistanceWheelchair', // Length, Cumulative\n basalEnergyBurned = 'HKQuantityTypeIdentifierBasalEnergyBurned', // Energy, Cumulative\n activeEnergyBurned = 'HKQuantityTypeIdentifierActiveEnergyBurned', // Energy, Cumulative\n flightsClimbed = 'HKQuantityTypeIdentifierFlightsClimbed', // Scalar(Count), Cumulative\n nikeFuel = 'HKQuantityTypeIdentifierNikeFuel', // Scalar(Count), Cumulative\n appleExerciseTime = 'HKQuantityTypeIdentifierAppleExerciseTime', // Time Cumulative\n pushCount = 'HKQuantityTypeIdentifierPushCount', // Scalar(Count), Cumulative\n distanceSwimming = 'HKQuantityTypeIdentifierDistanceSwimming', // Length, Cumulative\n swimmingStrokeCount = 'HKQuantityTypeIdentifierSwimmingStrokeCount', // Scalar(Count), Cumulative\n vo2Max = 'HKQuantityTypeIdentifierVO2Max', // ml/(kg*min) Discrete\n distanceDownhillSnowSports = 'HKQuantityTypeIdentifierDistanceDownhillSnowSports', // Length, Cumulative\n\n appleStandTime = 'HKQuantityTypeIdentifierAppleStandTime', // Time, Cumulative\n // Vitals\n heartRate = 'HKQuantityTypeIdentifierHeartRate', // Scalar(Count)/Time, Discrete\n bodyTemperature = 'HKQuantityTypeIdentifierBodyTemperature', // Temperature, Discrete\n basalBodyTemperature = 'HKQuantityTypeIdentifierBasalBodyTemperature', // Basal Body Temperature, Discrete\n bloodPressureSystolic = 'HKQuantityTypeIdentifierBloodPressureSystolic', // Pressure, Discrete\n bloodPressureDiastolic = 'HKQuantityTypeIdentifierBloodPressureDiastolic', // Pressure, Discrete\n respiratoryRate = 'HKQuantityTypeIdentifierRespiratoryRate', // Scalar(Count)/Time, Discrete\n // Beats per minute estimate of a user's lowest heart rate while at rest\n restingHeartRate = 'HKQuantityTypeIdentifierRestingHeartRate', // Scalar(Count)/Time, Discrete\n // Average heartbeats per minute captured by an Apple Watch while a user is walking\n walkingHeartRateAverage = 'HKQuantityTypeIdentifierWalkingHeartRateAverage', // Scalar(Count)/Time, Discrete\n // The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal)\n\n heartRateVariabilitySDNN = 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN', // Time (ms), Discrete\n // Results\n oxygenSaturation = 'HKQuantityTypeIdentifierOxygenSaturation', // Scalar (Percent, 0.0 - 1.0, Discrete\n peripheralPerfusionIndex = 'HKQuantityTypeIdentifierPeripheralPerfusionIndex', // Scalar(Percent, 0.0 - 1.0), Discrete\n bloodGlucose = 'HKQuantityTypeIdentifierBloodGlucose', // Mass/Volume, Discrete\n numberOfTimesFallen = 'HKQuantityTypeIdentifierNumberOfTimesFallen', // Scalar(Count), Cumulative\n electrodermalActivity = 'HKQuantityTypeIdentifierElectrodermalActivity', // Conductance, Discrete\n inhalerUsage = 'HKQuantityTypeIdentifierInhalerUsage', // Scalar(Count), Cumulative\n insulinDelivery = 'HKQuantityTypeIdentifierInsulinDelivery', // Pharmacology (IU) Cumulative\n bloodAlcoholContent = 'HKQuantityTypeIdentifierBloodAlcoholContent', // Scalar(Percent, 0.0 - 1.0), Discrete\n forcedVitalCapacity = 'HKQuantityTypeIdentifierForcedVitalCapacity', // Volume, Discrete\n forcedExpiratoryVolume1 = 'HKQuantityTypeIdentifierForcedExpiratoryVolume1', // Volume, Discrete\n peakExpiratoryFlowRate = 'HKQuantityTypeIdentifierPeakExpiratoryFlowRate', // Volume/Time, Discrete\n environmentalAudioExposure = 'HKQuantityTypeIdentifierEnvironmentalAudioExposure', // Pressure, Cumulative\n\n headphoneAudioExposure = 'HKQuantityTypeIdentifierHeadphoneAudioExposure', // Pressure, Cumulative\n // Nutrition\n dietaryFatTotal = 'HKQuantityTypeIdentifierDietaryFatTotal', // Mass, Cumulative\n dietaryFatPolyunsaturated = 'HKQuantityTypeIdentifierDietaryFatPolyunsaturated', // Mass, Cumulative\n dietaryFatMonounsaturated = 'HKQuantityTypeIdentifierDietaryFatMonounsaturated', // Mass, Cumulative\n dietaryFatSaturated = 'HKQuantityTypeIdentifierDietaryFatSaturated', // Mass, Cumulative\n dietaryCholesterol = 'HKQuantityTypeIdentifierDietaryCholesterol', // Mass, Cumulative\n dietarySodium = 'HKQuantityTypeIdentifierDietarySodium', // Mass, Cumulative\n dietaryCarbohydrates = 'HKQuantityTypeIdentifierDietaryCarbohydrates', // Mass, Cumulative\n dietaryFiber = 'HKQuantityTypeIdentifierDietaryFiber', // Mass, Cumulative\n dietarySugar = 'HKQuantityTypeIdentifierDietarySugar', // Mass, Cumulative\n dietaryEnergyConsumed = 'HKQuantityTypeIdentifierDietaryEnergyConsumed', // Energy, Cumulative\n dietaryProtein = 'HKQuantityTypeIdentifierDietaryProtein', // Mass, Cumulative\n\n dietaryVitaminA = 'HKQuantityTypeIdentifierDietaryVitaminA', // Mass, Cumulative\n dietaryVitaminB6 = 'HKQuantityTypeIdentifierDietaryVitaminB6', // Mass, Cumulative\n dietaryVitaminB12 = 'HKQuantityTypeIdentifierDietaryVitaminB12', // Mass, Cumulative\n dietaryVitaminC = 'HKQuantityTypeIdentifierDietaryVitaminC', // Mass, Cumulative\n dietaryVitaminD = 'HKQuantityTypeIdentifierDietaryVitaminD', // Mass, Cumulative\n dietaryVitaminE = 'HKQuantityTypeIdentifierDietaryVitaminE', // Mass, Cumulative\n dietaryVitaminK = 'HKQuantityTypeIdentifierDietaryVitaminK', // Mass, Cumulative\n dietaryCalcium = 'HKQuantityTypeIdentifierDietaryCalcium', // Mass, Cumulative\n dietaryIron = 'HKQuantityTypeIdentifierDietaryIron', // Mass, Cumulative\n dietaryThiamin = 'HKQuantityTypeIdentifierDietaryThiamin', // Mass, Cumulative\n dietaryRiboflavin = 'HKQuantityTypeIdentifierDietaryRiboflavin', // Mass, Cumulative\n dietaryNiacin = 'HKQuantityTypeIdentifierDietaryNiacin', // Mass, Cumulative\n dietaryFolate = 'HKQuantityTypeIdentifierDietaryFolate', // Mass, Cumulative\n dietaryBiotin = 'HKQuantityTypeIdentifierDietaryBiotin', // Mass, Cumulative\n dietaryPantothenicAcid = 'HKQuantityTypeIdentifierDietaryPantothenicAcid', // Mass, Cumulative\n dietaryPhosphorus = 'HKQuantityTypeIdentifierDietaryPhosphorus', // Mass, Cumulative\n dietaryIodine = 'HKQuantityTypeIdentifierDietaryIodine', // Mass, Cumulative\n dietaryMagnesium = 'HKQuantityTypeIdentifierDietaryMagnesium', // Mass, Cumulative\n dietaryZinc = 'HKQuantityTypeIdentifierDietaryZinc', // Mass, Cumulative\n dietarySelenium = 'HKQuantityTypeIdentifierDietarySelenium', // Mass, Cumulative\n dietaryCopper = 'HKQuantityTypeIdentifierDietaryCopper', // Mass, Cumulative\n dietaryManganese = 'HKQuantityTypeIdentifierDietaryManganese', // Mass, Cumulative\n dietaryChromium = 'HKQuantityTypeIdentifierDietaryChromium', // Mass, Cumulative\n dietaryMolybdenum = 'HKQuantityTypeIdentifierDietaryMolybdenum', // Mass, Cumulative\n dietaryChloride = 'HKQuantityTypeIdentifierDietaryChloride', // Mass, Cumulative\n dietaryPotassium = 'HKQuantityTypeIdentifierDietaryPotassium', // Mass, Cumulative\n dietaryCaffeine = 'HKQuantityTypeIdentifierDietaryCaffeine', // Mass, Cumulative\n dietaryWater = 'HKQuantityTypeIdentifierDietaryWater', // Volume, Cumulative\n\n // Mobility\n sixMinuteWalkTestDistance = 'HKQuantityTypeIdentifierSixMinuteWalkTestDistance',\n walkingSpeed = 'HKQuantityTypeIdentifierWalkingSpeed',\n walkingStepLength = 'HKQuantityTypeIdentifierWalkingStepLength',\n walkingAsymmetryPercentage = 'HKQuantityTypeIdentifierWalkingAsymmetryPercentage',\n walkingDoubleSupportPercentage = 'HKQuantityTypeIdentifierWalkingDoubleSupportPercentage',\n stairAscentSpeed = 'HKQuantityTypeIdentifierStairAscentSpeed',\n stairDescentSpeed = 'HKQuantityTypeIdentifierStairDescentSpeed',\n\n uvExposure = 'HKQuantityTypeIdentifierUVExposure', // Scalar (Count), Discrete\n\n appleMoveTime = 'HKQuantityTypeIdentifierAppleMoveTime', // Time, Cumulative\n appleWalkingSteadiness = 'HKQuantityTypeIdentifierAppleWalkingSteadiness', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n numberOfAlcoholicBeverages = 'HKQuantityTypeIdentifierNumberOfAlcoholicBeverages', // Scalar(Count), Cumulative\n\n atrialFibrillationBurden = 'HKQuantityTypeIdentifierAtrialFibrillationBurden', // Scalar(Percent, 0.0 - 1.0), Discrete\n\n underwaterDepth = 'HKQuantityTypeIdentifierUnderwaterDepth', // Length, Discrete\n\n waterTemperature = 'HKQuantityTypeIdentifierWaterTemperature', // Temperature, Discrete\n\n appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete\n\n timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',\n\n physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',\n\n cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',\n\n cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',\n\n cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',\n\n cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',\n\n environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',\n\n heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',\n}\n\nexport type TypeToUnitMapping = {\n readonly [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKCategoryValueLowCardioFitnessEvent {\n lowFitness = 1,\n}\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcorrelationtypeidentifier\n */\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier\n */\nexport enum HKCategoryTypeIdentifier {\n sleepAnalysis = 'HKCategoryTypeIdentifierSleepAnalysis',\n appleStandHour = 'HKCategoryTypeIdentifierAppleStandHour',\n cervicalMucusQuality = 'HKCategoryTypeIdentifierCervicalMucusQuality',\n ovulationTestResult = 'HKCategoryTypeIdentifierOvulationTestResult',\n menstrualFlow = 'HKCategoryTypeIdentifierMenstrualFlow',\n intermenstrualBleeding = 'HKCategoryTypeIdentifierIntermenstrualBleeding',\n sexualActivity = 'HKCategoryTypeIdentifierSexualActivity',\n mindfulSession = 'HKCategoryTypeIdentifierMindfulSession',\n highHeartRateEvent = 'HKCategoryTypeIdentifierHighHeartRateEvent',\n lowHeartRateEvent = 'HKCategoryTypeIdentifierLowHeartRateEvent',\n irregularHeartRhythmEvent = 'HKCategoryTypeIdentifierIrregularHeartRhythmEvent',\n /**\n * @deprecated Use environmentalAudioExposureEvent instead.\n */\n audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n lowCardioFitnessEvent = 'HKCategoryTypeIdentifierLowCardioFitnessEvent',\n contraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n pregnancyTestResult = 'HKCategoryTypeIdentifierPregnancyTestResult',\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue\n\n // Symptoms\n abdominalCramps = 'HKCategoryTypeIdentifierAbdominalCramps', // HKCategoryValueSeverity\n acne = 'HKCategoryTypeIdentifierAcne', // HKCategoryValueSeverity\n appetiteChanges = 'HKCategoryTypeIdentifierAppetiteChanges', // HKCategoryValueAppetiteChanges\n bladderIncontinence = 'HKCategoryTypeIdentifierBladderIncontinence', // HKCategoryValueSeverity\n bloating = 'HKCategoryTypeIdentifierBloating', // HKCategoryValueSeverity\n breastPain = 'HKCategoryTypeIdentifierBreastPain', // HKCategoryValueSeverity\n chestTightnessOrPain = 'HKCategoryTypeIdentifierChestTightnessOrPain', // HKCategoryValueSeverity\n chills = 'HKCategoryTypeIdentifierChills', // HKCategoryValueSeverity\n constipation = 'HKCategoryTypeIdentifierConstipation', // HKCategoryValueSeverity\n coughing = 'HKCategoryTypeIdentifierCoughing', // HKCategoryValueSeverity\n diarrhea = 'HKCategoryTypeIdentifierDiarrhea', // HKCategoryValueSeverity\n dizziness = 'HKCategoryTypeIdentifierDizziness', // HKCategoryValueSeverity\n drySkin = 'HKCategoryTypeIdentifierDrySkin', // HKCategoryValueSeverity\n fainting = 'HKCategoryTypeIdentifierFainting', // HKCategoryValueSeverity\n fatigue = 'HKCategoryTypeIdentifierFatigue', // HKCategoryValueSeverity\n fever = 'HKCategoryTypeIdentifierFever', // HKCategoryValueSeverity\n generalizedBodyAche = 'HKCategoryTypeIdentifierGeneralizedBodyAche', // HKCategoryValueSeverity\n hairLoss = 'HKCategoryTypeIdentifierHairLoss', // HKCategoryValueSeverity\n headache = 'HKCategoryTypeIdentifierHeadache', // HKCategoryValueSeverity\n heartburn = 'HKCategoryTypeIdentifierHeartburn', // HKCategoryValueSeverity\n hotFlashes = 'HKCategoryTypeIdentifierHotFlashes', // HKCategoryValueSeverity\n lossOfSmell = 'HKCategoryTypeIdentifierLossOfSmell', // HKCategoryValueSeverity\n lossOfTaste = 'HKCategoryTypeIdentifierLossOfTaste', // HKCategoryValueSeverity\n lowerBackPain = 'HKCategoryTypeIdentifierLowerBackPain', // HKCategoryValueSeverity\n memoryLapse = 'HKCategoryTypeIdentifierMemoryLapse', // HKCategoryValueSeverity\n moodChanges = 'HKCategoryTypeIdentifierMoodChanges', // HKCategoryValuePresence\n nausea = 'HKCategoryTypeIdentifierNausea', // HKCategoryValueSeverity\n nightSweats = 'HKCategoryTypeIdentifierNightSweats', // HKCategoryValueSeverity\n pelvicPain = 'HKCategoryTypeIdentifierPelvicPain', // HKCategoryValueSeverity\n rapidPoundingOrFlutteringHeartbeat = 'HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat', // HKCategoryValueSeverity\n runnyNose = 'HKCategoryTypeIdentifierRunnyNose', // HKCategoryValueSeverity\n shortnessOfBreath = 'HKCategoryTypeIdentifierShortnessOfBreath', // HKCategoryValueSeverity\n sinusCongestion = 'HKCategoryTypeIdentifierSinusCongestion', // HKCategoryValueSeverity\n skippedHeartbeat = 'HKCategoryTypeIdentifierSkippedHeartbeat', // HKCategoryValueSeverity\n sleepChanges = 'HKCategoryTypeIdentifierSleepChanges', // HKCategoryValuePresence\n soreThroat = 'HKCategoryTypeIdentifierSoreThroat', // HKCategoryValueSeverity\n vaginalDryness = 'HKCategoryTypeIdentifierVaginalDryness', // HKCategoryValueSeverity\n vomiting = 'HKCategoryTypeIdentifierVomiting', // HKCategoryValueSeverity\n wheezing = 'HKCategoryTypeIdentifierWheezing', // HKCategoryValueSeverity\n}\n\nexport type HKSampleTypeIdentifier =\n | HKCategoryTypeIdentifier\n | HKCorrelationTypeIdentifier\n | HKQuantityTypeIdentifier\n | typeof HKAudiogramTypeIdentifier\n | typeof HKDataTypeIdentifierHeartbeatSeries\n | typeof HKWorkoutRouteTypeIdentifier\n | typeof HKWorkoutTypeIdentifier\n | `${HKCategoryTypeIdentifier}`\n | `${HKCorrelationTypeIdentifier}`\n | `${HKQuantityTypeIdentifier}`;\n\nexport type HealthkitReadAuthorization =\n | HKCharacteristicTypeIdentifier\n | HKSampleTypeIdentifier\n | `${HKCharacteristicTypeIdentifier}`\n | `${HKSampleTypeIdentifier}`;\nexport type HealthkitWriteAuthorization = HKSampleTypeIdentifier;\n\nexport enum HKCategoryValueAppleStandHour {\n stood = 0,\n idle = 1,\n}\n\nexport enum HKWorkoutActivityType {\n americanFootball = 1,\n archery = 2,\n australianFootball = 3,\n badminton = 4,\n baseball = 5,\n basketball = 6,\n bowling = 7,\n boxing = 8, // See also HKWorkoutActivityTypeKickboxing.,\n climbing = 9,\n cricket = 10,\n crossTraining = 11, // Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,\n curling = 12,\n cycling = 13,\n dance = 14,\n danceInspiredTraining = 15, // This enum remains available to access older data.,\n elliptical = 16,\n equestrianSports = 17, // Polo, Horse Racing, Horse Riding, etc.,\n fencing = 18,\n fishing = 19,\n functionalStrengthTraining = 20, // Primarily free weights and/or body weight and/or accessories,\n golf = 21,\n gymnastics = 22,\n handball = 23,\n hiking = 24,\n hockey = 25, // Ice Hockey, Field Hockey, etc.,\n hunting = 26,\n lacrosse = 27,\n martialArts = 28,\n mindAndBody = 29, // Qigong, meditation, etc.,\n mixedMetabolicCardioTraining = 30, // This enum remains available to access older data.,\n paddleSports = 31, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,\n play = 32, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,\n preparationAndRecovery = 33, // Foam rolling, stretching, etc.,\n racquetball = 34,\n rowing = 35,\n rugby = 36,\n running = 37,\n sailing = 38,\n skatingSports = 39, // Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,\n snowSports = 40, // Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,\n soccer = 41,\n softball = 42,\n squash = 43,\n stairClimbing = 44, // See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,\n surfingSports = 45, // Traditional Surfing, Kite Surfing, Wind Surfing, etc.,\n swimming = 46,\n tableTennis = 47,\n tennis = 48,\n trackAndField = 49, // Shot Put, Javelin, Pole Vaulting, etc.,\n traditionalStrengthTraining = 50, // Primarily machines and/or free weights,\n volleyball = 51,\n walking = 52,\n waterFitness = 53,\n waterPolo = 54,\n waterSports = 55, // Water Skiing, Wake Boarding, etc.,\n wrestling = 56,\n yoga = 57,\n barre = 58, // HKWorkoutActivityTypeDanceInspiredTraining,\n coreTraining = 59,\n crossCountrySkiing = 60,\n downhillSkiing = 61,\n flexibility = 62,\n highIntensityIntervalTraining = 63,\n jumpRope = 64,\n kickboxing = 65,\n pilates = 66, // HKWorkoutActivityTypeDanceInspiredTraining,\n snowboarding = 67,\n stairs = 68,\n stepTraining = 69,\n wheelchairWalkPace = 70,\n wheelchairRunPace = 71,\n taiChi = 72,\n mixedCardio = 73, // HKWorkoutActivityTypeMixedMetabolicCardioTraining,\n handCycling = 74,\n discSports = 75,\n fitnessGaming = 76,\n other = 3000,\n}\n\nexport type HKGenericMetadata = {\n readonly [key: string]: HKQuantity | boolean | number | string | undefined;\n readonly HKExternalUUID?: string;\n readonly HKTimeZone?: string;\n readonly HKWasUserEntered?: boolean;\n readonly HKDeviceSerialNumber?: string;\n readonly HKUDIDeviceIdentifier?: string;\n readonly HKUDIProductionIdentifier?: string;\n readonly HKDigitalSignature?: string;\n readonly HKDeviceName?: string;\n readonly HKDeviceManufacturerName?: string;\n readonly HKSyncIdentifier?: string;\n readonly HKSyncVersion?: number;\n readonly HKWasTakenInLab?: boolean;\n readonly HKReferenceRangeLowerLimit?: number;\n readonly HKReferenceRangeUpperLimit?: number;\n};\n\n// documented at https://developer.apple.com/documentation/healthkit/hkweathercondition\nexport enum HKWeatherCondition {\n none = 0,\n clear = 1,\n fair = 2,\n partlyCloudy = 3,\n mostlyCloudy = 4,\n cloudy = 5,\n foggy = 6,\n haze = 7,\n windy = 8,\n blustery = 9,\n smoky = 10,\n dust = 11,\n snow = 12,\n hail = 13,\n sleet = 14,\n freezingDrizzle = 15,\n freezingRain = 16,\n mixedRainAndHail = 17,\n mixedRainAndSnow = 18,\n mixedRainAndSleet = 19,\n mixedSnowAndSleet = 20,\n drizzle = 21,\n scatteredShowers = 22,\n showers = 23,\n thunderstorms = 24,\n tropicalStorm = 25,\n hurricane = 26,\n tornado = 27,\n}\n\nenum HKIndoorWorkout {\n false = 0,\n true = 1,\n}\n\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* <TTemperatureUnit extends HKUnit> */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Percent\n >;\n // HKWeatherTemperature: HKQuantity<TTemperatureUnit>\n readonly HKAverageMETs?: HKQuantity<HKQuantityTypeIdentifier, HKUnit>;\n readonly HKElevationAscended?: HKQuantity<\n HKQuantityTypeIdentifier,\n LengthUnit\n >;\n readonly HKIndoorWorkout?: HKIndoorWorkout;\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationrequeststatus\n */\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkauthorizationstatus\n */\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier> = UnitForIdentifier<TIdentifier>\n> = {\n readonly unit: TUnit;\n readonly quantity: number;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbloodtype\n */\nexport enum HKBloodType {\n notSet = 0,\n aPositive = 1,\n aNegative = 2,\n bPositive = 3,\n bNegative = 4,\n abPositive = 5,\n abNegative = 6,\n oPositive = 7,\n oNegative = 8,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkbiologicalsex\n */\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintype\n */\nexport enum HKFitzpatrickSkinType {\n notSet = 0,\n I = 1,\n II = 2,\n III = 3,\n IV = 4,\n V = 5,\n VI = 6,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkstatisticsoptions\n */\nexport enum HKStatisticsOptions {\n cumulativeSum = 'cumulativeSum',\n discreteAverage = 'discreteAverage',\n discreteMax = 'discreteMax',\n discreteMin = 'discreteMin',\n discreteMostRecent = 'discreteMostRecent',\n duration = 'duration',\n mostRecent = 'mostRecent',\n separateBySource = 'separateBySource',\n}\n\nexport type QueryStatisticsResponseRaw<\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n> = {\n readonly averageQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly maximumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly minimumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly sumQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly mostRecentQuantity?: HKQuantity<TIdentifier, TUnit>;\n readonly mostRecentQuantityDateInterval?: {\n readonly from: string;\n readonly to: string;\n };\n readonly duration?: HKQuantity<HKQuantityTypeIdentifier, TimeUnit>;\n};\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluecervicalmucusquality\n */\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluemenstrualflow\n */\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueovulationtestresult\n */\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis\n */\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleepUnspecified = 1,\n awake = 2,\n asleepCore = 3,\n asleepDeep = 4,\n asleepREM = 5\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvalueappetitechanges\n */\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\n/**\n * https://developer.apple.com/documentation/healthkit/hkcategoryvaluepresence\n */\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalueseverity\n */\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue/notapplicable\n */\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvalue\n */\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueLowCardioFitnessEvent\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason\n */\nexport enum HKInsulinDeliveryReason {\n basal = 1,\n bolus = 2,\n}\n\nexport type MetadataMapperForQuantityIdentifier<\n TQuantityTypeIdentifier = HKQuantityTypeIdentifier\n> = TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKGenericMetadata & {\n readonly HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n readonly HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n readonly HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n readonly HKFoodType?: string;\n }\n : HKGenericMetadata;\n\nexport type UnitForIdentifier<T extends HKQuantityTypeIdentifier> =\n T extends HKQuantityTypeIdentifier.bloodGlucose\n ? BloodGlucoseUnit\n : T extends\n | HKQuantityTypeIdentifier.appleExerciseTime\n | HKQuantityTypeIdentifier.appleMoveTime\n | HKQuantityTypeIdentifier.appleStandTime\n ? TimeUnit\n : T extends\n | HKQuantityTypeIdentifier.activeEnergyBurned\n | HKQuantityTypeIdentifier.basalEnergyBurned\n | HKQuantityTypeIdentifier.dietaryEnergyConsumed\n ? EnergyUnit\n : T extends\n | HKQuantityTypeIdentifier.distanceCycling\n | HKQuantityTypeIdentifier.distanceDownhillSnowSports\n | HKQuantityTypeIdentifier.distanceSwimming\n | HKQuantityTypeIdentifier.distanceWalkingRunning\n | HKQuantityTypeIdentifier.distanceWheelchair\n | HKQuantityTypeIdentifier.sixMinuteWalkTestDistance\n | HKQuantityTypeIdentifier.waistCircumference\n ? LengthUnit\n : T extends\n | HKQuantityTypeIdentifier.bodyFatPercentage\n | HKQuantityTypeIdentifier.oxygenSaturation\n | HKQuantityTypeIdentifier.walkingAsymmetryPercentage\n | HKQuantityTypeIdentifier.walkingDoubleSupportPercentage\n ? HKUnits.Percent\n : T extends\n | HKQuantityTypeIdentifier.basalBodyTemperature\n | HKQuantityTypeIdentifier.basalBodyTemperature\n ? TemperatureUnit\n : T extends\n | HKQuantityTypeIdentifier.stairAscentSpeed\n | HKQuantityTypeIdentifier.stairDescentSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n | HKQuantityTypeIdentifier.walkingSpeed\n ? SpeedUnit<LengthUnit, TimeUnit>\n : T extends\n | HKQuantityTypeIdentifier.flightsClimbed\n | HKQuantityTypeIdentifier.numberOfAlcoholicBeverages\n | HKQuantityTypeIdentifier.numberOfTimesFallen\n | HKQuantityTypeIdentifier.pushCount\n | HKQuantityTypeIdentifier.stepCount\n | HKQuantityTypeIdentifier.swimmingStrokeCount\n ? HKUnits.Count\n : T extends\n | HKQuantityTypeIdentifier.dietaryBiotin\n | HKQuantityTypeIdentifier.dietaryCaffeine\n | HKQuantityTypeIdentifier.dietaryCalcium\n | HKQuantityTypeIdentifier.dietaryCarbohydrates\n | HKQuantityTypeIdentifier.dietaryChloride\n | HKQuantityTypeIdentifier.dietaryCholesterol\n | HKQuantityTypeIdentifier.dietaryChromium\n | HKQuantityTypeIdentifier.dietaryCopper\n | HKQuantityTypeIdentifier.dietaryFatMonounsaturated\n | HKQuantityTypeIdentifier.dietaryFatPolyunsaturated\n | HKQuantityTypeIdentifier.dietaryFatSaturated\n | HKQuantityTypeIdentifier.dietaryFatTotal\n | HKQuantityTypeIdentifier.dietaryFiber\n | HKQuantityTypeIdentifier.dietaryFolate\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIodine\n | HKQuantityTypeIdentifier.dietaryIron\n | HKQuantityTypeIdentifier.dietaryMagnesium\n | HKQuantityTypeIdentifier.dietaryManganese\n | HKQuantityTypeIdentifier.dietaryMolybdenum\n | HKQuantityTypeIdentifier.dietaryNiacin\n | HKQuantityTypeIdentifier.dietaryPantothenicAcid\n | HKQuantityTypeIdentifier.dietaryPhosphorus\n | HKQuantityTypeIdentifier.dietaryPotassium\n | HKQuantityTypeIdentifier.dietaryProtein\n | HKQuantityTypeIdentifier.dietaryRiboflavin\n | HKQuantityTypeIdentifier.dietarySelenium\n | HKQuantityTypeIdentifier.dietarySodium\n | HKQuantityTypeIdentifier.dietarySugar\n | HKQuantityTypeIdentifier.dietaryThiamin\n | HKQuantityTypeIdentifier.dietaryVitaminA\n | HKQuantityTypeIdentifier.dietaryVitaminB6\n | HKQuantityTypeIdentifier.dietaryVitaminB12\n | HKQuantityTypeIdentifier.dietaryVitaminC\n | HKQuantityTypeIdentifier.dietaryVitaminD\n | HKQuantityTypeIdentifier.dietaryVitaminE\n | HKQuantityTypeIdentifier.dietaryVitaminK\n | HKQuantityTypeIdentifier.dietaryZinc\n ? MassUnit\n : T extends HKQuantityTypeIdentifier.dietaryWater\n ? VolumeUnit\n : T extends HKQuantityTypeIdentifier.insulinDelivery\n ? HKUnits.InternationalUnit | `${HKUnits.InternationalUnit}`\n : T extends\n | HKQuantityTypeIdentifier.heartRate\n | HKQuantityTypeIdentifier.restingHeartRate\n | HKQuantityTypeIdentifier.walkingHeartRateAverage\n ? CountPerTime<TimeUnit>\n : HKUnit;\n\nexport type HKCategoryValueForIdentifier<T extends HKCategoryTypeIdentifier> =\n T extends HKCategoryTypeIdentifier.cervicalMucusQuality\n ? HKCategoryValueCervicalMucusQuality\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKCategoryValueMenstrualFlow\n : T extends HKCategoryTypeIdentifier.ovulationTestResult\n ? HKCategoryValueOvulationTestResult\n : T extends HKCategoryTypeIdentifier.sleepAnalysis\n ? HKCategoryValueSleepAnalysis\n : T extends\n | HKCategoryTypeIdentifier.highHeartRateEvent\n | HKCategoryTypeIdentifier.intermenstrualBleeding\n | HKCategoryTypeIdentifier.mindfulSession\n | HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.abdominalCramps\n | HKCategoryTypeIdentifier.acne\n | HKCategoryTypeIdentifier.bladderIncontinence\n | HKCategoryTypeIdentifier.bloating\n | HKCategoryTypeIdentifier.breastPain\n | HKCategoryTypeIdentifier.chestTightnessOrPain\n | HKCategoryTypeIdentifier.chills\n | HKCategoryTypeIdentifier.constipation\n | HKCategoryTypeIdentifier.coughing\n | HKCategoryTypeIdentifier.diarrhea\n | HKCategoryTypeIdentifier.dizziness\n | HKCategoryTypeIdentifier.drySkin\n | HKCategoryTypeIdentifier.fainting\n | HKCategoryTypeIdentifier.fatigue\n | HKCategoryTypeIdentifier.fever\n | HKCategoryTypeIdentifier.generalizedBodyAche\n | HKCategoryTypeIdentifier.hairLoss\n | HKCategoryTypeIdentifier.headache\n | HKCategoryTypeIdentifier.heartburn\n | HKCategoryTypeIdentifier.hotFlashes\n | HKCategoryTypeIdentifier.lossOfSmell\n | HKCategoryTypeIdentifier.lossOfTaste\n | HKCategoryTypeIdentifier.lowerBackPain\n | HKCategoryTypeIdentifier.memoryLapse\n | HKCategoryTypeIdentifier.moodChanges\n | HKCategoryTypeIdentifier.nausea\n | HKCategoryTypeIdentifier.nightSweats\n | HKCategoryTypeIdentifier.pelvicPain\n | HKCategoryTypeIdentifier.rapidPoundingOrFlutteringHeartbeat\n | HKCategoryTypeIdentifier.runnyNose\n | HKCategoryTypeIdentifier.shortnessOfBreath\n | HKCategoryTypeIdentifier.sinusCongestion\n | HKCategoryTypeIdentifier.skippedHeartbeat\n | HKCategoryTypeIdentifier.soreThroat\n | HKCategoryTypeIdentifier.vaginalDryness\n | HKCategoryTypeIdentifier.vomiting\n | HKCategoryTypeIdentifier.wheezing\n ? HKCategoryValueSeverity\n : T extends\n | HKCategoryTypeIdentifier.appetiteChanges\n | HKCategoryTypeIdentifier.sleepChanges\n ? HKCategoryValuePresence\n : T extends HKCategoryTypeIdentifier.lowCardioFitnessEvent\n ? HKCategoryValueLowCardioFitnessEvent\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.pregnancyTestResult\n ? HKCategoryValuePregnancyTestResult\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkcategoryvaluepregnancytestresult\n */\nenum HKCategoryValuePregnancyTestResult {\n positive = 2,\n negative = 1,\n indeterminate = 3,\n}\n/* needs further mapping\n\ncontraceptive = 'HKCategoryTypeIdentifierContraceptive',\n lactation = 'HKCategoryTypeIdentifierLactation',\n pregnancy = 'HKCategoryTypeIdentifierPregnancy',\n\n progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',\n environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',\n headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',\n appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',\n handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */\n\nexport type HKHeartbeatSeriesSampleMetadata = HKGenericMetadata & {\n readonly HKMetadataKeyAlgorithmVersion: string;\n}\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n readonly HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n readonly HKMenstrualCycleStart: boolean;\n }\n : HKGenericMetadata;\n\n// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse\nexport enum HKWheelchairUse {\n notSet = 0,\n no = 1,\n yes = 2,\n}\n\n// Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init\nexport enum HKMetricPrefix {\n None = '',\n Pico = 'p',\n Nano = 'n',\n Micro = 'mc',\n Milli = 'm',\n Centi = 'c',\n Deci = 'd',\n Deca = 'da',\n Hecto = 'h',\n Kilo = 'k',\n Mega = 'M',\n Giga = 'G',\n Tera = 'T',\n Femto = 'f',\n}\n\nexport enum HKUnitMetric {\n Gram = 'g',\n Joule = 'J',\n Kelvin = 'K',\n Liter = 'l',\n Meter = 'm',\n Pascal = 'Pa',\n Second = 's',\n Siemen = 'S',\n Hertz = 'Hz',\n Volt = 'V',\n}\n\nexport enum HKUnits {\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n\n Percent = '%',\n Count = 'count',\n InternationalUnit = 'IU',\n}\n\nexport type MeterUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Meter}`;\nexport type LiterUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Liter}`;\nexport type GramUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Gram}`;\nexport type PascalUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Pascal}`;\nexport type SecondUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Second}`;\nexport type JouleUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Joule}`;\nexport type HertzUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Hertz}`;\nexport type VoltUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Volt}`;\nexport type SiemenUnit<Prefix extends HKMetricPrefix = HKMetricPrefix.None> =\n `${Prefix}${HKUnitMetric.Siemen}`;\n\n// not 100% sure about these\nexport type MoleUnit<MolarMass extends number> = `mol<${MolarMass}>`;\nexport type MoleUnitWith<\n MolarMass extends number,\n Prefix extends HKMetricPrefix = HKMetricPrefix.None\n> = `${Prefix}mol<${MolarMass}>`;\n\nexport type FrequencyUnit = HertzUnit<HKMetricPrefix>;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\nexport enum UnitOfLength {\n Feet = 'ft',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'cm', 'km'\n */\n Meter = 'm',\n Inches = 'in',\n Yards = 'yd',\n Miles = 'mi',\n}\nexport type LengthUnit = MeterUnit<HKMetricPrefix> | UnitOfLength;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\nexport enum UnitOfVolume {\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ml', 'cl'\n */\n Liter = 'l',\n}\nexport type VolumeUnit = LiterUnit<HKMetricPrefix> | UnitOfVolume;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport enum UnitOfMass {\n Ounces = 'oz',\n Stones = 'st',\n Pounds = 'lb',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\n Gram = 'g',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'mg', 'kg'\n */\nexport type MassUnit = GramUnit<HKMetricPrefix> | UnitOfMass;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport enum UnitOfPressure {\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n MillimetersOfMercury = 'mmHg',\n InchesOfMercury = 'inHg',\n DecibelAWeightedSoundPressureLevel = 'dBASPL',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\n Pascals = 'Pa',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kPa', 'hPa'\n */\nexport type PressureUnit = PascalUnit<HKMetricPrefix> | UnitOfPressure;\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport enum UnitOfTime {\n Days = 'd',\n Minutes = 'min',\n Hours = 'hr',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\n Seconds = 's',\n}\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'ms'\n */\nexport type TimeUnit = SecondUnit<HKMetricPrefix> | UnitOfTime;\nexport enum TemperatureUnit {\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Kelvin = 'K',\n}\n\n/**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\nexport enum UnitOfEnergy {\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n SmallCalories = 'cal',\n /**\n * More SI prefixes also available as literals, just type the string\n * @example 'kJ'\n */\n Joules = 'J',\n}\nexport type EnergyUnit = JouleUnit<HKMetricPrefix> | UnitOfEnergy;\nexport enum BloodGlucoseUnit {\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type SpeedUnit<\n TLength extends LengthUnit,\n TTime extends TimeUnit\n> = `${TLength}/${TTime}`;\nexport type CountPerTime<TTime extends TimeUnit> = `count/${TTime}`;\n\nexport type HKUnit =\n | BloodGlucoseUnit\n | CountPerTime<TimeUnit>\n | EnergyUnit\n | FrequencyUnit\n | HKUnits\n | LengthUnit\n | MassUnit\n | PressureUnit\n | SpeedUnit<LengthUnit, TimeUnit>\n | TemperatureUnit\n | TimeUnit\n | VolumeUnit\n | `${BloodGlucoseUnit}`\n | `${EnergyUnit}`\n | `${FrequencyUnit}`\n | `${HKUnits}`\n | `${LengthUnit}`\n | `${MassUnit}`\n | `${PressureUnit}`\n | `${TemperatureUnit}`\n | `${TimeUnit}`\n | `${VolumeUnit}`;\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkdevice\n */\nexport type HKDevice = {\n readonly name: string; // ex: \"Apple Watch\"\n readonly firmwareVersion: string | null;\n readonly hardwareVersion: string; // ex: \"Watch6,2\",\n readonly localIdentifier: string | null;\n readonly manufacturer: string; // ex: \"Apple Inc.\"\n readonly model: string; // ex: \"Watch\"\n readonly softwareVersion: string; // ex: \"9.0\"\n readonly udiDeviceIdentifier: string | null\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615781-source\n */\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkobject/1615483-sourcerevision\n */\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\n/**\n * See https://developer.apple.com/documentation/healthkit/hkquantitysample\n */\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TQuantityIdentifier> = UnitForIdentifier<TQuantityIdentifier>\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly quantityType: TQuantityIdentifier;\n readonly startDate: string;\n readonly endDate: string;\n readonly quantity: number;\n readonly unit: TUnit;\n readonly metadata: MetadataMapperForQuantityIdentifier<TQuantityIdentifier>;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type HKHeartbeatRaw = {\n readonly timeSinceSeriesStart: number,\n readonly precededByGap: boolean\n}\n\nexport type HKHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly startDate: string;\n readonly endDate: string;\n readonly heartbeats: readonly HKHeartbeatRaw[];\n readonly metadata?: HKHeartbeatSeriesSampleMetadata;\n readonly sourceRevision?: HKSourceRevision;\n}\n\nexport type HKQuantitySampleRawForSaving<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TQuantityIdentifier> = UnitForIdentifier<TQuantityIdentifier>\n> = Omit<\nHKQuantitySampleRaw<TQuantityIdentifier, TUnit>,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKCategorySampleRawForSaving<\n TCategory extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = Omit<\nHKCategorySampleRaw<TCategory>,\n'device' | 'endDate' | 'startDate' | 'uuid'\n>;\n\nexport type HKWorkoutRaw<\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity<HKQuantityTypeIdentifier, TDistance>;\n readonly totalEnergyBurned?: HKQuantity<HKQuantityTypeIdentifier, TEnergy>;\n readonly totalSwimmingStrokeCount?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly totalFlightsClimbed?: HKQuantity<\n HKQuantityTypeIdentifier,\n HKUnits.Count\n >;\n readonly startDate: string;\n readonly endDate: string;\n readonly metadata?: HKWorkoutMetadata;\n readonly sourceRevision?: HKSourceRevision;\n};\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier\nexport enum HKCharacteristicTypeIdentifier {\n fitzpatrickSkinType = 'HKCharacteristicTypeIdentifierFitzpatrickSkinType',\n biologicalSex = 'HKCharacteristicTypeIdentifierBiologicalSex',\n bloodType = 'HKCharacteristicTypeIdentifierBloodType',\n dateOfBirth = 'HKCharacteristicTypeIdentifierDateOfBirth',\n wheelchairUse = 'HKCharacteristicTypeIdentifierWheelchairUse',\n activityMoveMode = 'HKCharacteristicTypeIdentifierActivityMoveMode', // HKActivityMoveModeObject\n}\n\nexport type WritePermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in\n | HKCategoryTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly categoryType: T;\n readonly startDate: string;\n readonly endDate: string;\n readonly value: HKCategoryValueForIdentifier<T>;\n readonly metadata: MetadataMapperForCategoryIdentifier<T>;\n readonly sourceRevision?: HKSourceRevision;\n};\n\nexport type DeletedCategorySampleRaw<T extends HKCategoryTypeIdentifier> = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForCategoryIdentifier<T>\n}\n\nexport type DeletedHeartbeatSeriesSampleRaw = {\n readonly uuid: string;\n readonly metadata: HKHeartbeatSeriesSampleMetadata;\n}\n\nexport type DeletedQuantitySampleRaw<T extends HKQuantityTypeIdentifier> = {\n readonly uuid: string;\n readonly metadata: MetadataMapperForQuantityIdentifier<T>\n}\n\nexport type QueryCategorySamplesResponseRaw<T extends HKCategoryTypeIdentifier> = {\n readonly samples: readonly HKCategorySampleRaw<T>[],\n readonly deletedSamples: readonly DeletedCategorySampleRaw<T>[],\n readonly newAnchor: string\n}\n\nexport type QueryHeartbeatSeriesSamplesResponseRaw = {\n readonly samples: readonly HKHeartbeatSeriesSampleRaw[],\n readonly deletedSamples: readonly DeletedHeartbeatSeriesSampleRaw[],\n readonly newAnchor: string\n}\n\nexport type QueryQuantitySamplesResponseRaw<T extends HKQuantityTypeIdentifier> = {\n readonly samples: readonly HKQuantitySampleRaw<T>[],\n readonly deletedSamples: readonly DeletedQuantitySampleRaw<T>[],\n readonly newAnchor: string\n}\n\nexport type HKCorrelationRaw<TIdentifier extends HKCorrelationTypeIdentifier> =\n {\n readonly correlationType: HKCorrelationTypeIdentifier;\n readonly objects: readonly (HKCategorySampleRaw | HKQuantitySampleRaw)[];\n readonly metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>;\n readonly startDate: string;\n readonly endDate: string;\n };\n\ntype QueryId = string;\n\n/** See https://developer.apple.com/documentation/healthkit/hkupdatefrequency */\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n readonly longitude: number;\n readonly latitude: number;\n readonly altitude: number;\n readonly speed: number;\n readonly timestamp: number;\n readonly horizontalAccuracy: number;\n readonly speedAccuracy: number;\n readonly verticalAccuracy: number;\n readonly distance: number | null;\n};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable */\n isHealthDataAvailable(): Promise<boolean>;\n canAccessProtectedData(): Promise<boolean>;\n getBloodType(): Promise<HKBloodType>;\n getDateOfBirth(): Promise<string>;\n getBiologicalSex(): Promise<HKBiologicalSex>;\n getFitzpatrickSkinType(): Promise<HKFitzpatrickSkinType>;\n readonly getWheelchairUse: () => Promise<HKWheelchairUse>;\n\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614175-enablebackgrounddelivery */\n readonly enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise<boolean>;\n /** https://developer.apple.com/documentation/healthkit/hkhealthstore/1614177-disablebackgrounddelivery */\n readonly disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise<boolean>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614158-disableallbackgrounddelivery */\n readonly disableAllBackgroundDelivery: () => Promise<boolean>;\n\n readonly saveCorrelationSample: <\n TIdentifier extends HKCorrelationTypeIdentifier,\n TSamples extends readonly (\n | HKCategorySampleRawForSaving\n | HKQuantitySampleRawForSaving\n )[]\n >(\n typeIdentifier: TIdentifier,\n samples: TSamples,\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>\n ) => Promise<boolean>;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly HKQuantitySampleRawForSaving[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise<boolean>;\n\n readonly queryCorrelationSamples: <\n TIdentifier extends HKCorrelationTypeIdentifier\n >(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise<readonly HKCorrelationRaw<TIdentifier>[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise<QueryId>;\n unsubscribeQuery(queryId: QueryId): Promise<boolean>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus */\n authorizationStatusFor(type: HealthkitReadAuthorization): Promise<HKAuthorizationStatus>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/2994346-getrequeststatusforauthorization */\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise<HKAuthorizationRequestStatus>;\n /** See https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization */\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise<boolean>;\n readonly saveQuantitySample: <\n TType extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TType> = UnitForIdentifier<TType>\n >(\n identifier: TType,\n unit: TUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise<boolean>;\n readonly deleteQuantitySample: <TIdentifier extends HKQuantityTypeIdentifier>(\n typeIdentifier: TIdentifier,\n uuid: string\n ) => Promise<boolean>;\n readonly deleteSamples: <TIdentifier extends HKQuantityTypeIdentifier>(\n identifier: TIdentifier,\n start: string,\n end: string,\n ) => Promise<boolean>;\n readonly queryWorkoutSamples: <\n TEnergy extends EnergyUnit,\n TDistance extends LengthUnit\n >(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise<readonly HKWorkoutRaw<TEnergy, TDistance>[]>;\n readonly queryCategorySamples: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKCategorySampleRaw<T>[]>;\n readonly queryQuantitySamples: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKQuantitySampleRaw<TIdentifier>[]>;\n readonly queryCategorySamplesWithAnchor: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryCategorySamplesResponseRaw<T>>;\n readonly queryQuantitySamplesWithAnchor: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryQuantitySamplesResponseRaw<TIdentifier>>;\n readonly queryHeartbeatSeriesSamples: (\n from: string,\n to: string,\n limit: number,\n ascending: boolean,\n ) => Promise<readonly HKHeartbeatSeriesSampleRaw[]>;\n readonly queryHeartbeatSeriesSamplesWithAnchor: (\n from: string,\n to: string,\n limit: number,\n anchor: string\n ) => Promise<QueryHeartbeatSeriesSamplesResponseRaw>;\n readonly querySources: <\n TIdentifier extends HKCategoryTypeIdentifier | HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier\n ) => Promise<readonly HKSource[]>;\n readonly saveCategorySample: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n value: HKCategoryValueForIdentifier<T>,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise<boolean>;\n readonly queryStatisticsForQuantity: <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends UnitForIdentifier<TIdentifier>\n >(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise<QueryStatisticsResponseRaw<TIdentifier, TUnit>>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise<TypeToUnitMapping>;\n readonly getWorkoutRoutes: (\n workoutUUID: string\n ) => Promise<readonly WorkoutRoute[]>;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n readonly addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit as NativeModule,\n) as HealthkitEventEmitter\n\nexport default Native\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAkB,cAAc;AAI1E;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,yBAAkC;AACzE,OAAO,MAAMC,yBAAyB,GAAG,2BAAoC;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,8BAAuC;AACnF,OAAO,MAAMC,mCAAmC,GAAG,qCAA8C;;AAEjG;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wB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AACA;AACA;;AAsEA;AACA,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA,OAM6B;AA0EvE;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AA0M7B,MAAMC,MAAM,GAAG5C,aAAa,CAAC6C,oBAAsD;AAenF,OAAO,MAAMC,YAAY,GAAG,IAAI/C,kBAAkB,CAChDC,aAAa,CAAC6C,oBAChB,CAA0B;AAE1B,eAAeD,MAAM"}
@@ -116,7 +116,9 @@ export declare enum HKQuantityTypeIdentifier {
116
116
  cyclingSpeed = "HKQuantityTypeIdentifierCyclingSpeed",
117
117
  cyclingPower = "HKQuantityTypeIdentifierCyclingPower",
118
118
  cyclingFunctionalThresholdPower = "HKQuantityTypeIdentifierCyclingFunctionalThresholdPower",
119
- cyclingCadence = "HKQuantityTypeIdentifierCyclingCadence"
119
+ cyclingCadence = "HKQuantityTypeIdentifierCyclingCadence",
120
+ environmentalSoundReduction = "HKQuantityTypeIdentifierEnvironmentalSoundReduction",
121
+ heartRateRecoveryOneMinute = "HKQuantityTypeIdentifierHeartRateRecoveryOneMinute"
120
122
  }
121
123
  export type TypeToUnitMapping = {
122
124
  readonly [key in HKQuantityTypeIdentifier]: HKUnit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kingstinct/react-native-healthkit",
3
- "version": "7.0.3",
3
+ "version": "7.0.4",
4
4
  "description": "React Native bindings for HealthKit",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -1,4 +1,4 @@
1
- import { NativeEventEmitter, NativeModules } from 'react-native'
1
+ import { NativeEventEmitter, NativeModules, Platform } from 'react-native'
2
2
 
3
3
  import type { EmitterSubscription, NativeModule } from 'react-native'
4
4
 
@@ -137,17 +137,21 @@ export enum HKQuantityTypeIdentifier {
137
137
 
138
138
  appleSleepingWristTemperature = 'HKQuantityTypeIdentifierAppleSleepingWristTemperature', // Temperature, Discrete
139
139
 
140
- timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight', // Time, Cumulative
140
+ timeInDaylight = 'HKQuantityTypeIdentifierTimeInDaylight',
141
141
 
142
- physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort', // Scalar(Percent, 0.0 - 1.0), Discrete
142
+ physicalEffort = 'HKQuantityTypeIdentifierPhysicalEffort',
143
143
 
144
- cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed', // Length/Time, Discrete
144
+ cyclingSpeed = 'HKQuantityTypeIdentifierCyclingSpeed',
145
145
 
146
- cyclingPower = 'HKQuantityTypeIdentifierCyclingPower', // Power, Discrete
146
+ cyclingPower = 'HKQuantityTypeIdentifierCyclingPower',
147
147
 
148
- cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower', // Power, Discrete
148
+ cyclingFunctionalThresholdPower = 'HKQuantityTypeIdentifierCyclingFunctionalThresholdPower',
149
149
 
150
- cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence', // Scalar(Count)/Time, Discrete
150
+ cyclingCadence = 'HKQuantityTypeIdentifierCyclingCadence',
151
+
152
+ environmentalSoundReduction = 'HKQuantityTypeIdentifierEnvironmentalSoundReduction',
153
+
154
+ heartRateRecoveryOneMinute = 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute',
151
155
  }
152
156
 
153
157
  export type TypeToUnitMapping = {