@kingstinct/react-native-healthkit 4.3.0 → 4.4.2

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.
@@ -1 +1 @@
1
- {"version":3,"names":["notAvailableError","Platform","OS","UnavailableFn","Error","Healthkit","authorizationStatusFor","buildUnitWithPrefix","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","getBloodType","getDateOfBirth","getFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","getWheelchairUse","getWorkoutRoutes","isHealthDataAvailable","Promise","resolve","queryCategorySamples","queryCorrelationSamples","queryQuantitySamples","queryStatisticsForQuantity","queryWorkouts","requestAuthorization","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native';\nimport type { ReactNativeHealthkit } from './types';\n\nconst notAvailableError =\n 'Platform \"' +\n Platform.OS +\n '\" not supported, use isHealthDataAvailable to check for availability before using it';\n\nconst UnavailableFn = () => {\n throw new Error(notAvailableError);\n};\n\nconst Healthkit: ReactNativeHealthkit = {\n authorizationStatusFor: UnavailableFn,\n buildUnitWithPrefix: UnavailableFn,\n disableAllBackgroundDelivery: UnavailableFn,\n disableBackgroundDelivery: UnavailableFn,\n enableBackgroundDelivery: UnavailableFn,\n getBiologicalSex: UnavailableFn,\n getBloodType: UnavailableFn,\n getDateOfBirth: UnavailableFn,\n getFitzpatrickSkinType: UnavailableFn,\n getMostRecentCategorySample: UnavailableFn,\n getMostRecentQuantitySample: UnavailableFn,\n getMostRecentWorkout: UnavailableFn,\n getPreferredUnit: UnavailableFn,\n getPreferredUnits: UnavailableFn,\n getRequestStatusForAuthorization: UnavailableFn,\n getWheelchairUse: UnavailableFn,\n getWorkoutRoutes: UnavailableFn,\n isHealthDataAvailable: () => Promise.resolve(false),\n queryCategorySamples: UnavailableFn,\n queryCorrelationSamples: UnavailableFn,\n queryQuantitySamples: UnavailableFn,\n queryStatisticsForQuantity: UnavailableFn,\n queryWorkouts: UnavailableFn,\n requestAuthorization: UnavailableFn,\n saveCategorySample: UnavailableFn,\n saveCorrelationSample: UnavailableFn,\n saveQuantitySample: UnavailableFn,\n saveWorkoutSample: UnavailableFn,\n subscribeToChanges: UnavailableFn,\n useMostRecentCategorySample: UnavailableFn,\n useMostRecentQuantitySample: UnavailableFn,\n useMostRecentWorkout: UnavailableFn,\n useSubscribeToChanges: UnavailableFn,\n};\n\nexport * from './native-types';\nexport * from './types';\n\nexport default Healthkit;\n"],"mappings":";;;;;;;;AAAA;;AAgDA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AA9CA,MAAMA,iBAAiB,GACrB,eACAC,qBAAA,CAASC,EADT,GAEA,sFAHF;;AAKA,MAAMC,aAAa,GAAG,MAAM;EAC1B,MAAM,IAAIC,KAAJ,CAAUJ,iBAAV,CAAN;AACD,CAFD;;AAIA,MAAMK,SAA+B,GAAG;EACtCC,sBAAsB,EAAEH,aADc;EAEtCI,mBAAmB,EAAEJ,aAFiB;EAGtCK,4BAA4B,EAAEL,aAHQ;EAItCM,yBAAyB,EAAEN,aAJW;EAKtCO,wBAAwB,EAAEP,aALY;EAMtCQ,gBAAgB,EAAER,aANoB;EAOtCS,YAAY,EAAET,aAPwB;EAQtCU,cAAc,EAAEV,aARsB;EAStCW,sBAAsB,EAAEX,aATc;EAUtCY,2BAA2B,EAAEZ,aAVS;EAWtCa,2BAA2B,EAAEb,aAXS;EAYtCc,oBAAoB,EAAEd,aAZgB;EAatCe,gBAAgB,EAAEf,aAboB;EActCgB,iBAAiB,EAAEhB,aAdmB;EAetCiB,gCAAgC,EAAEjB,aAfI;EAgBtCkB,gBAAgB,EAAElB,aAhBoB;EAiBtCmB,gBAAgB,EAAEnB,aAjBoB;EAkBtCoB,qBAAqB,EAAE,MAAMC,OAAO,CAACC,OAAR,CAAgB,KAAhB,CAlBS;EAmBtCC,oBAAoB,EAAEvB,aAnBgB;EAoBtCwB,uBAAuB,EAAExB,aApBa;EAqBtCyB,oBAAoB,EAAEzB,aArBgB;EAsBtC0B,0BAA0B,EAAE1B,aAtBU;EAuBtC2B,aAAa,EAAE3B,aAvBuB;EAwBtC4B,oBAAoB,EAAE5B,aAxBgB;EAyBtC6B,kBAAkB,EAAE7B,aAzBkB;EA0BtC8B,qBAAqB,EAAE9B,aA1Be;EA2BtC+B,kBAAkB,EAAE/B,aA3BkB;EA4BtCgC,iBAAiB,EAAEhC,aA5BmB;EA6BtCiC,kBAAkB,EAAEjC,aA7BkB;EA8BtCkC,2BAA2B,EAAElC,aA9BS;EA+BtCmC,2BAA2B,EAAEnC,aA/BS;EAgCtCoC,oBAAoB,EAAEpC,aAhCgB;EAiCtCqC,qBAAqB,EAAErC;AAjCe,CAAxC;eAuCeE,S"}
1
+ {"version":3,"names":["notAvailableError","Platform","OS","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","buildUnitWithPrefix","HKUnit","Atmospheres","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","HKBiologicalSex","notSet","getBloodType","HKBloodType","getDateOfBirth","Date","getFitzpatrickSkinType","HKFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","getPreferredUnits","getRequestStatusForAuthorization","HKAuthorizationRequestStatus","unknown","getWheelchairUse","HKWheelchairUse","getWorkoutRoutes","isHealthDataAvailable","queryCategorySamples","queryCorrelationSamples","queryQuantitySamples","queryStatisticsForQuantity","averageQuantity","undefined","maximumQuantity","minimumQuantity","sumQuantity","mostRecentQuantity","mostRecentQuantityDateInterval","duration","queryWorkouts","requestAuthorization","saveCategorySample","saveCorrelationSample","saveQuantitySample","saveWorkoutSample","subscribeToChanges","useMostRecentCategorySample","useMostRecentQuantitySample","useMostRecentWorkout","useSubscribeToChanges","useHealthkitAuthorization","useIsHealthDataAvailable"],"sources":["index.tsx"],"sourcesContent":["import { Platform } from 'react-native'\n\nimport {\n HKAuthorizationRequestStatus, HKBiologicalSex, HKBloodType, HKFitzpatrickSkinType, HKUnit, HKWheelchairUse,\n} from './native-types'\n\nimport type { ReactNativeHealthkit } from './types'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nfunction UnavailableFn<T = unknown>(retVal: T) {\n return () => {\n console.warn(notAvailableError)\n return retVal\n }\n}\n\nconst Healthkit: ReactNativeHealthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(false)),\n buildUnitWithPrefix: UnavailableFn(HKUnit.Atmospheres),\n disableAllBackgroundDelivery: UnavailableFn(Promise.resolve(false)),\n disableBackgroundDelivery: UnavailableFn(Promise.resolve(false)),\n enableBackgroundDelivery: UnavailableFn(Promise.resolve(false)),\n getBiologicalSex: UnavailableFn(Promise.resolve(HKBiologicalSex.notSet)),\n getBloodType: UnavailableFn(Promise.resolve(HKBloodType.notSet)),\n getDateOfBirth: UnavailableFn(Promise.resolve(new Date(0))),\n getFitzpatrickSkinType: UnavailableFn(Promise.resolve(HKFitzpatrickSkinType.notSet)),\n getMostRecentCategorySample: UnavailableFn(Promise.resolve(null)),\n getMostRecentQuantitySample: UnavailableFn(Promise.resolve(null)),\n getMostRecentWorkout: UnavailableFn(Promise.resolve(null)),\n getPreferredUnit: UnavailableFn(Promise.resolve(HKUnit.Atmospheres)),\n getPreferredUnits: UnavailableFn(Promise.resolve([])),\n getRequestStatusForAuthorization: UnavailableFn(Promise.resolve(HKAuthorizationRequestStatus.unknown)),\n getWheelchairUse: UnavailableFn(Promise.resolve(HKWheelchairUse.notSet)),\n getWorkoutRoutes: UnavailableFn(Promise.resolve([])),\n isHealthDataAvailable: async () => Promise.resolve(false),\n queryCategorySamples: UnavailableFn(Promise.resolve([])),\n queryCorrelationSamples: UnavailableFn(Promise.resolve([])),\n queryQuantitySamples: UnavailableFn(Promise.resolve([])),\n queryStatisticsForQuantity: UnavailableFn(Promise.resolve({\n averageQuantity: undefined,\n maximumQuantity: undefined,\n minimumQuantity: undefined,\n sumQuantity: undefined,\n mostRecentQuantity: undefined,\n mostRecentQuantityDateInterval: undefined,\n duration: undefined,\n })),\n queryWorkouts: UnavailableFn(Promise.resolve([])),\n requestAuthorization: UnavailableFn(Promise.resolve(false)),\n saveCategorySample: UnavailableFn(Promise.resolve(false)),\n saveCorrelationSample: UnavailableFn(Promise.resolve(false)),\n saveQuantitySample: UnavailableFn(Promise.resolve(false)),\n saveWorkoutSample: UnavailableFn(Promise.resolve(false)),\n subscribeToChanges: UnavailableFn(Promise.resolve(async () => Promise.resolve(false))),\n useMostRecentCategorySample: UnavailableFn(null),\n useMostRecentQuantitySample: UnavailableFn(null),\n useMostRecentWorkout: UnavailableFn(null),\n useSubscribeToChanges: UnavailableFn([null, () => null]),\n useHealthkitAuthorization: UnavailableFn([null, async () => Promise.resolve(null)] as const),\n useIsHealthDataAvailable: UnavailableFn(false),\n}\n\nexport * from './native-types'\nexport * from './types'\n\nexport default Healthkit\n"],"mappings":";;;;;;;;AAAA;;AAEA;;AA+DA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AA1DA,MAAMA,iBAAiB,GAAI,kDACzBC,qBAAA,CAASC,EACV,iBAFD;;AAIA,SAASC,aAAT,CAAoCC,MAApC,EAA+C;EAC7C,OAAO,MAAM;IACXC,OAAO,CAACC,IAAR,CAAaN,iBAAb;IACA,OAAOI,MAAP;EACD,CAHD;AAID;;AAED,MAAM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C,kBAAkB,EAAEnD,aAAa,CAACM,OAAO,CAACC,OAAR,CAAgB,KAAhB,CAAD,CAnCK;EAoCtC6C,iBAAiB,EAAEpD,aAAa,CAACM,OAAO,CAACC,OAAR,CAAgB,KAAhB,CAAD,CApCM;EAqCtC8C,kBAAkB,EAAErD,aAAa,CAACM,OAAO,CAACC,OAAR,CAAgB,YAAYD,OAAO,CAACC,OAAR,CAAgB,KAAhB,CAA5B,CAAD,CArCK;EAsCtC+C,2BAA2B,EAAEtD,aAAa,CAAC,IAAD,CAtCJ;EAuCtCuD,2BAA2B,EAAEvD,aAAa,CAAC,IAAD,CAvCJ;EAwCtCwD,oBAAoB,EAAExD,aAAa,CAAC,IAAD,CAxCG;EAyCtCyD,qBAAqB,EAAEzD,aAAa,CAAC,CAAC,IAAD,EAAO,MAAM,IAAb,CAAD,CAzCE;EA0CtC0D,yBAAyB,EAAE1D,aAAa,CAAC,CAAC,IAAD,EAAO,YAAYM,OAAO,CAACC,OAAR,CAAgB,IAAhB,CAAnB,CAAD,CA1CF;EA2CtCoD,wBAAwB,EAAE3D,aAAa,CAAC,KAAD;AA3CD,CAAxC;eAiDeI,S"}
@@ -3,10 +3,115 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.HKWorkoutActivityType = exports.HKWheelchairUse = exports.HKWeatherCondition = exports.HKUpdateFrequency = exports.HKUnitSIPrefix = exports.HKUnitSI = exports.HKUnit = exports.HKStatisticsOptions = exports.HKQuantityTypeIdentifier = exports.HKInsulinDeliveryReason = exports.HKHeartRateMotionContext = exports.HKFitzpatrickSkinType = exports.HKCorrelationTypeIdentifier = exports.HKCharacteristicTypeIdentifier = exports.HKCategoryValueSleepAnalysis = exports.HKCategoryValueSeverity = exports.HKCategoryValuePresence = exports.HKCategoryValueOvulationTestResult = exports.HKCategoryValueNotApplicable = exports.HKCategoryValueMenstrualFlow = exports.HKCategoryValueCervicalMucusQuality = exports.HKCategoryValueAppleStandHour = exports.HKCategoryValueAppetiteChanges = exports.HKCategoryTypeIdentifier = exports.HKBloodType = exports.HKBiologicalSex = exports.HKAuthorizationStatus = exports.HKAuthorizationRequestStatus = exports.EventEmitter = void 0;
6
+ exports.default = exports.HealthkitAuthorization = exports.HKWorkoutTypeIdentifier = exports.HKWorkoutRouteTypeIdentifier = exports.HKWorkoutActivityType = exports.HKWheelchairUse = exports.HKWeatherCondition = exports.HKUpdateFrequency = exports.HKUnitSIPrefix = exports.HKUnitSI = exports.HKUnit = exports.HKStatisticsOptions = exports.HKSampleTypeIdentifier = exports.HKQuantityTypeIdentifier = exports.HKInsulinDeliveryReason = exports.HKHeartRateMotionContext = exports.HKFitzpatrickSkinType = exports.HKDataTypeIdentifierHeartbeatSeries = exports.HKCorrelationTypeIdentifier = exports.HKCharacteristicTypeIdentifier = exports.HKCategoryValueSleepAnalysis = exports.HKCategoryValueSeverity = exports.HKCategoryValuePresence = exports.HKCategoryValueOvulationTestResult = exports.HKCategoryValueNotApplicable = exports.HKCategoryValueMenstrualFlow = exports.HKCategoryValueCervicalMucusQuality = exports.HKCategoryValueAppleStandHour = exports.HKCategoryValueAppetiteChanges = exports.HKCategoryTypeIdentifier = exports.HKBloodType = exports.HKBiologicalSex = exports.HKAuthorizationStatus = exports.HKAuthorizationRequestStatus = exports.HKAudiogramTypeIdentifier = exports.EventEmitter = void 0;
7
7
 
8
8
  var _reactNative = require("react-native");
9
9
 
10
+ const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier';
11
+ exports.HKWorkoutTypeIdentifier = HKWorkoutTypeIdentifier;
12
+ const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier';
13
+ exports.HKAudiogramTypeIdentifier = HKAudiogramTypeIdentifier;
14
+ const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier';
15
+ exports.HKWorkoutRouteTypeIdentifier = HKWorkoutRouteTypeIdentifier;
16
+ const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries'; // Straight mapping to https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier
17
+
18
+ exports.HKDataTypeIdentifierHeartbeatSeries = HKDataTypeIdentifierHeartbeatSeries;
19
+ let HKQuantityTypeIdentifier;
20
+ exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier;
21
+
22
+ (function (HKQuantityTypeIdentifier) {
23
+ HKQuantityTypeIdentifier["bodyMassIndex"] = "HKQuantityTypeIdentifierBodyMassIndex";
24
+ HKQuantityTypeIdentifier["bodyFatPercentage"] = "HKQuantityTypeIdentifierBodyFatPercentage";
25
+ HKQuantityTypeIdentifier["height"] = "HKQuantityTypeIdentifierHeight";
26
+ HKQuantityTypeIdentifier["bodyMass"] = "HKQuantityTypeIdentifierBodyMass";
27
+ HKQuantityTypeIdentifier["leanBodyMass"] = "HKQuantityTypeIdentifierLeanBodyMass";
28
+ HKQuantityTypeIdentifier["waistCircumference"] = "HKQuantityTypeIdentifierWaistCircumference";
29
+ HKQuantityTypeIdentifier["stepCount"] = "HKQuantityTypeIdentifierStepCount";
30
+ HKQuantityTypeIdentifier["distanceWalkingRunning"] = "HKQuantityTypeIdentifierDistanceWalkingRunning";
31
+ HKQuantityTypeIdentifier["distanceCycling"] = "HKQuantityTypeIdentifierDistanceCycling";
32
+ HKQuantityTypeIdentifier["distanceWheelchair"] = "HKQuantityTypeIdentifierDistanceWheelchair";
33
+ HKQuantityTypeIdentifier["basalEnergyBurned"] = "HKQuantityTypeIdentifierBasalEnergyBurned";
34
+ HKQuantityTypeIdentifier["activeEnergyBurned"] = "HKQuantityTypeIdentifierActiveEnergyBurned";
35
+ HKQuantityTypeIdentifier["flightsClimbed"] = "HKQuantityTypeIdentifierFlightsClimbed";
36
+ HKQuantityTypeIdentifier["nikeFuel"] = "HKQuantityTypeIdentifierNikeFuel";
37
+ HKQuantityTypeIdentifier["appleExerciseTime"] = "HKQuantityTypeIdentifierAppleExerciseTime";
38
+ HKQuantityTypeIdentifier["pushCount"] = "HKQuantityTypeIdentifierPushCount";
39
+ HKQuantityTypeIdentifier["distanceSwimming"] = "HKQuantityTypeIdentifierDistanceSwimming";
40
+ HKQuantityTypeIdentifier["swimmingStrokeCount"] = "HKQuantityTypeIdentifierSwimmingStrokeCount";
41
+ HKQuantityTypeIdentifier["vo2Max"] = "HKQuantityTypeIdentifierVo2Max";
42
+ HKQuantityTypeIdentifier["distanceDownhillSnowSports"] = "HKQuantityTypeIdentifierDistanceDownhillSnowSports";
43
+ HKQuantityTypeIdentifier["appleStandTime"] = "HKQuantityTypeIdentifierAppleStandTime";
44
+ HKQuantityTypeIdentifier["heartRate"] = "HKQuantityTypeIdentifierHeartRate";
45
+ HKQuantityTypeIdentifier["bodyTemperature"] = "HKQuantityTypeIdentifierBodyTemperature";
46
+ HKQuantityTypeIdentifier["basalBodyTemperature"] = "HKQuantityTypeIdentifierBasalBodyTemperature";
47
+ HKQuantityTypeIdentifier["bloodPressureSystolic"] = "HKQuantityTypeIdentifierBloodPressureSystolic";
48
+ HKQuantityTypeIdentifier["bloodPressureDiastolic"] = "HKQuantityTypeIdentifierBloodPressureDiastolic";
49
+ HKQuantityTypeIdentifier["respiratoryRate"] = "HKQuantityTypeIdentifierRespiratoryRate";
50
+ HKQuantityTypeIdentifier["restingHeartRate"] = "HKQuantityTypeIdentifierRestingHeartRate";
51
+ HKQuantityTypeIdentifier["walkingHeartRateAverage"] = "HKQuantityTypeIdentifierWalkingHeartRateAverage";
52
+ HKQuantityTypeIdentifier["heartRateVariabilitySDNN"] = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN";
53
+ HKQuantityTypeIdentifier["oxygenSaturation"] = "HKQuantityTypeIdentifierOxygenSaturation";
54
+ HKQuantityTypeIdentifier["peripheralPerfusionIndex"] = "HKQuantityTypeIdentifierPeripheralPerfusionIndex";
55
+ HKQuantityTypeIdentifier["bloodGlucose"] = "HKQuantityTypeIdentifierBloodGlucose";
56
+ HKQuantityTypeIdentifier["numberOfTimesFallen"] = "HKQuantityTypeIdentifierNumberOfTimesFallen";
57
+ HKQuantityTypeIdentifier["electrodermalActivity"] = "HKQuantityTypeIdentifierElectrodermalActivity";
58
+ HKQuantityTypeIdentifier["inhalerUsage"] = "HKQuantityTypeIdentifierInhalerUsage";
59
+ HKQuantityTypeIdentifier["insulinDelivery"] = "HKQuantityTypeIdentifierInsulinDelivery";
60
+ HKQuantityTypeIdentifier["bloodAlcoholContent"] = "HKQuantityTypeIdentifierBloodAlcoholContent";
61
+ HKQuantityTypeIdentifier["forcedVitalCapacity"] = "HKQuantityTypeIdentifierForcedVitalCapacity";
62
+ HKQuantityTypeIdentifier["forcedExpiratoryVolume1"] = "HKQuantityTypeIdentifierForcedExpiratoryVolume1";
63
+ HKQuantityTypeIdentifier["peakExpiratoryFlowRate"] = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate";
64
+ HKQuantityTypeIdentifier["environmentalAudioExposure"] = "HKQuantityTypeIdentifierEnvironmentalAudioExposure";
65
+ HKQuantityTypeIdentifier["headphoneAudioExposure"] = "HKQuantityTypeIdentifierHeadphoneAudioExposure";
66
+ HKQuantityTypeIdentifier["dietaryFatTotal"] = "HKQuantityTypeIdentifierDietaryFatTotal";
67
+ HKQuantityTypeIdentifier["dietaryFatPolyunsaturated"] = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated";
68
+ HKQuantityTypeIdentifier["dietaryFatMonounsaturated"] = "HKQuantityTypeIdentifierDietaryFatMonounsaturated";
69
+ HKQuantityTypeIdentifier["dietaryFatSaturated"] = "HKQuantityTypeIdentifierDietaryFatSaturated";
70
+ HKQuantityTypeIdentifier["dietaryCholesterol"] = "HKQuantityTypeIdentifierDietaryCholesterol";
71
+ HKQuantityTypeIdentifier["dietarySodium"] = "HKQuantityTypeIdentifierDietarySodium";
72
+ HKQuantityTypeIdentifier["dietaryCarbohydrates"] = "HKQuantityTypeIdentifierDietaryCarbohydrates";
73
+ HKQuantityTypeIdentifier["dietaryFiber"] = "HKQuantityTypeIdentifierDietaryFiber";
74
+ HKQuantityTypeIdentifier["dietarySugar"] = "HKQuantityTypeIdentifierDietarySugar";
75
+ HKQuantityTypeIdentifier["dietaryEnergyConsumed"] = "HKQuantityTypeIdentifierDietaryEnergyConsumed";
76
+ HKQuantityTypeIdentifier["dietaryProtein"] = "HKQuantityTypeIdentifierDietaryProtein";
77
+ HKQuantityTypeIdentifier["dietaryVitaminA"] = "HKQuantityTypeIdentifierDietaryVitaminA";
78
+ HKQuantityTypeIdentifier["dietaryVitaminB6"] = "HKQuantityTypeIdentifierDietaryVitaminB6";
79
+ HKQuantityTypeIdentifier["dietaryVitaminB12"] = "HKQuantityTypeIdentifierDietaryVitaminB12";
80
+ HKQuantityTypeIdentifier["dietaryVitaminC"] = "HKQuantityTypeIdentifierDietaryVitaminC";
81
+ HKQuantityTypeIdentifier["dietaryVitaminD"] = "HKQuantityTypeIdentifierDietaryVitaminD";
82
+ HKQuantityTypeIdentifier["dietaryVitaminE"] = "HKQuantityTypeIdentifierDietaryVitaminE";
83
+ HKQuantityTypeIdentifier["dietaryVitaminK"] = "HKQuantityTypeIdentifierDietaryVitaminK";
84
+ HKQuantityTypeIdentifier["dietaryCalcium"] = "HKQuantityTypeIdentifierDietaryCalcium";
85
+ HKQuantityTypeIdentifier["dietaryIron"] = "HKQuantityTypeIdentifierDietaryIron";
86
+ HKQuantityTypeIdentifier["dietaryThiamin"] = "HKQuantityTypeIdentifierDietaryThiamin";
87
+ HKQuantityTypeIdentifier["dietaryRiboflavin"] = "HKQuantityTypeIdentifierDietaryRiboflavin";
88
+ HKQuantityTypeIdentifier["dietaryNiacin"] = "HKQuantityTypeIdentifierDietaryNiacin";
89
+ HKQuantityTypeIdentifier["dietaryFolate"] = "HKQuantityTypeIdentifierDietaryFolate";
90
+ HKQuantityTypeIdentifier["dietaryBiotin"] = "HKQuantityTypeIdentifierDietaryBiotin";
91
+ HKQuantityTypeIdentifier["dietaryPantothenicAcid"] = "HKQuantityTypeIdentifierDietaryPantothenicAcid";
92
+ HKQuantityTypeIdentifier["dietaryPhosphorus"] = "HKQuantityTypeIdentifierDietaryPhosphorus";
93
+ HKQuantityTypeIdentifier["dietaryIodine"] = "HKQuantityTypeIdentifierDietaryIodine";
94
+ HKQuantityTypeIdentifier["dietaryMagnesium"] = "HKQuantityTypeIdentifierDietaryMagnesium";
95
+ HKQuantityTypeIdentifier["dietaryZinc"] = "HKQuantityTypeIdentifierDietaryZinc";
96
+ HKQuantityTypeIdentifier["dietarySelenium"] = "HKQuantityTypeIdentifierDietarySelenium";
97
+ HKQuantityTypeIdentifier["dietaryCopper"] = "HKQuantityTypeIdentifierDietaryCopper";
98
+ HKQuantityTypeIdentifier["dietaryManganese"] = "HKQuantityTypeIdentifierDietaryManganese";
99
+ HKQuantityTypeIdentifier["dietaryChromium"] = "HKQuantityTypeIdentifierDietaryChromium";
100
+ HKQuantityTypeIdentifier["dietaryMolybdenum"] = "HKQuantityTypeIdentifierDietaryMolybdenum";
101
+ HKQuantityTypeIdentifier["dietaryChloride"] = "HKQuantityTypeIdentifierDietaryChloride";
102
+ HKQuantityTypeIdentifier["dietaryPotassium"] = "HKQuantityTypeIdentifierDietaryPotassium";
103
+ HKQuantityTypeIdentifier["dietaryCaffeine"] = "HKQuantityTypeIdentifierDietaryCaffeine";
104
+ HKQuantityTypeIdentifier["dietaryWater"] = "HKQuantityTypeIdentifierDietaryWater";
105
+ HKQuantityTypeIdentifier["sixMinuteWalkTestDistance"] = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance";
106
+ HKQuantityTypeIdentifier["walkingSpeed"] = "HKQuantityTypeIdentifierWalkingSpeed";
107
+ HKQuantityTypeIdentifier["walkingStepLength"] = "HKQuantityTypeIdentifierWalkingStepLength";
108
+ HKQuantityTypeIdentifier["walkingAsymmetryPercentage"] = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage";
109
+ HKQuantityTypeIdentifier["walkingDoubleSupportPercentage"] = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage";
110
+ HKQuantityTypeIdentifier["stairAscentSpeed"] = "HKQuantityTypeIdentifierStairAscentSpeed";
111
+ HKQuantityTypeIdentifier["stairDescentSpeed"] = "HKQuantityTypeIdentifierStairDescentSpeed";
112
+ HKQuantityTypeIdentifier["uvExposure"] = "HKQuantityTypeIdentifierUvExposure";
113
+ })(HKQuantityTypeIdentifier || (exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier = {}));
114
+
10
115
  let HKHeartRateMotionContext;
11
116
  exports.HKHeartRateMotionContext = HKHeartRateMotionContext;
12
117
 
@@ -16,6 +121,14 @@ exports.HKHeartRateMotionContext = HKHeartRateMotionContext;
16
121
  HKHeartRateMotionContext[HKHeartRateMotionContext["sedentary"] = 1] = "sedentary";
17
122
  })(HKHeartRateMotionContext || (exports.HKHeartRateMotionContext = HKHeartRateMotionContext = {}));
18
123
 
124
+ let HKCorrelationTypeIdentifier;
125
+ exports.HKCorrelationTypeIdentifier = HKCorrelationTypeIdentifier;
126
+
127
+ (function (HKCorrelationTypeIdentifier) {
128
+ HKCorrelationTypeIdentifier["bloodPressure"] = "HKCorrelationTypeIdentifierBloodPressure";
129
+ HKCorrelationTypeIdentifier["food"] = "HKCorrelationTypeIdentifierFood";
130
+ })(HKCorrelationTypeIdentifier || (exports.HKCorrelationTypeIdentifier = HKCorrelationTypeIdentifier = {}));
131
+
19
132
  let HKCategoryTypeIdentifier;
20
133
  exports.HKCategoryTypeIdentifier = HKCategoryTypeIdentifier;
21
134
 
@@ -35,6 +148,15 @@ exports.HKCategoryTypeIdentifier = HKCategoryTypeIdentifier;
35
148
  HKCategoryTypeIdentifier["toothbrushingEvent"] = "HKCategoryTypeIdentifierToothbrushingEvent";
36
149
  })(HKCategoryTypeIdentifier || (exports.HKCategoryTypeIdentifier = HKCategoryTypeIdentifier = {}));
37
150
 
151
+ const HKSampleTypeIdentifier = { ...HKCategoryTypeIdentifier,
152
+ ...HKCorrelationTypeIdentifier,
153
+ ...HKQuantityTypeIdentifier,
154
+ audiogram: HKAudiogramTypeIdentifier,
155
+ heartbeatSeries: HKDataTypeIdentifierHeartbeatSeries,
156
+ workoutRoute: HKWorkoutRouteTypeIdentifier,
157
+ workoute: HKWorkoutTypeIdentifier
158
+ };
159
+ exports.HKSampleTypeIdentifier = HKSampleTypeIdentifier;
38
160
  let HKCategoryValueAppleStandHour;
39
161
  exports.HKCategoryValueAppleStandHour = HKCategoryValueAppleStandHour;
40
162
 
@@ -161,103 +283,6 @@ exports.HKWeatherCondition = HKWeatherCondition;
161
283
  HKWeatherCondition[HKWeatherCondition["tornado"] = 27] = "tornado";
162
284
  })(HKWeatherCondition || (exports.HKWeatherCondition = HKWeatherCondition = {}));
163
285
 
164
- // Straight mapping to https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier
165
- let HKQuantityTypeIdentifier;
166
- exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier;
167
-
168
- (function (HKQuantityTypeIdentifier) {
169
- HKQuantityTypeIdentifier["bodyMassIndex"] = "HKQuantityTypeIdentifierBodyMassIndex";
170
- HKQuantityTypeIdentifier["bodyFatPercentage"] = "HKQuantityTypeIdentifierBodyFatPercentage";
171
- HKQuantityTypeIdentifier["height"] = "HKQuantityTypeIdentifierHeight";
172
- HKQuantityTypeIdentifier["bodyMass"] = "HKQuantityTypeIdentifierBodyMass";
173
- HKQuantityTypeIdentifier["leanBodyMass"] = "HKQuantityTypeIdentifierLeanBodyMass";
174
- HKQuantityTypeIdentifier["waistCircumference"] = "HKQuantityTypeIdentifierWaistCircumference";
175
- HKQuantityTypeIdentifier["stepCount"] = "HKQuantityTypeIdentifierStepCount";
176
- HKQuantityTypeIdentifier["distanceWalkingRunning"] = "HKQuantityTypeIdentifierDistanceWalkingRunning";
177
- HKQuantityTypeIdentifier["distanceCycling"] = "HKQuantityTypeIdentifierDistanceCycling";
178
- HKQuantityTypeIdentifier["distanceWheelchair"] = "HKQuantityTypeIdentifierDistanceWheelchair";
179
- HKQuantityTypeIdentifier["basalEnergyBurned"] = "HKQuantityTypeIdentifierBasalEnergyBurned";
180
- HKQuantityTypeIdentifier["activeEnergyBurned"] = "HKQuantityTypeIdentifierActiveEnergyBurned";
181
- HKQuantityTypeIdentifier["flightsClimbed"] = "HKQuantityTypeIdentifierFlightsClimbed";
182
- HKQuantityTypeIdentifier["nikeFuel"] = "HKQuantityTypeIdentifierNikeFuel";
183
- HKQuantityTypeIdentifier["appleExerciseTime"] = "HKQuantityTypeIdentifierAppleExerciseTime";
184
- HKQuantityTypeIdentifier["pushCount"] = "HKQuantityTypeIdentifierPushCount";
185
- HKQuantityTypeIdentifier["distanceSwimming"] = "HKQuantityTypeIdentifierDistanceSwimming";
186
- HKQuantityTypeIdentifier["swimmingStrokeCount"] = "HKQuantityTypeIdentifierSwimmingStrokeCount";
187
- HKQuantityTypeIdentifier["vo2Max"] = "HKQuantityTypeIdentifierVo2Max";
188
- HKQuantityTypeIdentifier["distanceDownhillSnowSports"] = "HKQuantityTypeIdentifierDistanceDownhillSnowSports";
189
- HKQuantityTypeIdentifier["appleStandTime"] = "HKQuantityTypeIdentifierAppleStandTime";
190
- HKQuantityTypeIdentifier["heartRate"] = "HKQuantityTypeIdentifierHeartRate";
191
- HKQuantityTypeIdentifier["bodyTemperature"] = "HKQuantityTypeIdentifierBodyTemperature";
192
- HKQuantityTypeIdentifier["basalBodyTemperature"] = "HKQuantityTypeIdentifierBasalBodyTemperature";
193
- HKQuantityTypeIdentifier["bloodPressureSystolic"] = "HKQuantityTypeIdentifierBloodPressureSystolic";
194
- HKQuantityTypeIdentifier["bloodPressureDiastolic"] = "HKQuantityTypeIdentifierBloodPressureDiastolic";
195
- HKQuantityTypeIdentifier["respiratoryRate"] = "HKQuantityTypeIdentifierRespiratoryRate";
196
- HKQuantityTypeIdentifier["restingHeartRate"] = "HKQuantityTypeIdentifierRestingHeartRate";
197
- HKQuantityTypeIdentifier["walkingHeartRateAverage"] = "HKQuantityTypeIdentifierWalkingHeartRateAverage";
198
- HKQuantityTypeIdentifier["heartRateVariabilitySDNN"] = "HKQuantityTypeIdentifierHeartRateVariabilitySDNN";
199
- HKQuantityTypeIdentifier["oxygenSaturation"] = "HKQuantityTypeIdentifierOxygenSaturation";
200
- HKQuantityTypeIdentifier["peripheralPerfusionIndex"] = "HKQuantityTypeIdentifierPeripheralPerfusionIndex";
201
- HKQuantityTypeIdentifier["bloodGlucose"] = "HKQuantityTypeIdentifierBloodGlucose";
202
- HKQuantityTypeIdentifier["numberOfTimesFallen"] = "HKQuantityTypeIdentifierNumberOfTimesFallen";
203
- HKQuantityTypeIdentifier["electrodermalActivity"] = "HKQuantityTypeIdentifierElectrodermalActivity";
204
- HKQuantityTypeIdentifier["inhalerUsage"] = "HKQuantityTypeIdentifierInhalerUsage";
205
- HKQuantityTypeIdentifier["insulinDelivery"] = "HKQuantityTypeIdentifierInsulinDelivery";
206
- HKQuantityTypeIdentifier["bloodAlcoholContent"] = "HKQuantityTypeIdentifierBloodAlcoholContent";
207
- HKQuantityTypeIdentifier["forcedVitalCapacity"] = "HKQuantityTypeIdentifierForcedVitalCapacity";
208
- HKQuantityTypeIdentifier["forcedExpiratoryVolume1"] = "HKQuantityTypeIdentifierForcedExpiratoryVolume1";
209
- HKQuantityTypeIdentifier["peakExpiratoryFlowRate"] = "HKQuantityTypeIdentifierPeakExpiratoryFlowRate";
210
- HKQuantityTypeIdentifier["environmentalAudioExposure"] = "HKQuantityTypeIdentifierEnvironmentalAudioExposure";
211
- HKQuantityTypeIdentifier["headphoneAudioExposure"] = "HKQuantityTypeIdentifierHeadphoneAudioExposure";
212
- HKQuantityTypeIdentifier["dietaryFatTotal"] = "HKQuantityTypeIdentifierDietaryFatTotal";
213
- HKQuantityTypeIdentifier["dietaryFatPolyunsaturated"] = "HKQuantityTypeIdentifierDietaryFatPolyunsaturated";
214
- HKQuantityTypeIdentifier["dietaryFatMonounsaturated"] = "HKQuantityTypeIdentifierDietaryFatMonounsaturated";
215
- HKQuantityTypeIdentifier["dietaryFatSaturated"] = "HKQuantityTypeIdentifierDietaryFatSaturated";
216
- HKQuantityTypeIdentifier["dietaryCholesterol"] = "HKQuantityTypeIdentifierDietaryCholesterol";
217
- HKQuantityTypeIdentifier["dietarySodium"] = "HKQuantityTypeIdentifierDietarySodium";
218
- HKQuantityTypeIdentifier["dietaryCarbohydrates"] = "HKQuantityTypeIdentifierDietaryCarbohydrates";
219
- HKQuantityTypeIdentifier["dietaryFiber"] = "HKQuantityTypeIdentifierDietaryFiber";
220
- HKQuantityTypeIdentifier["dietarySugar"] = "HKQuantityTypeIdentifierDietarySugar";
221
- HKQuantityTypeIdentifier["dietaryEnergyConsumed"] = "HKQuantityTypeIdentifierDietaryEnergyConsumed";
222
- HKQuantityTypeIdentifier["dietaryProtein"] = "HKQuantityTypeIdentifierDietaryProtein";
223
- HKQuantityTypeIdentifier["dietaryVitaminA"] = "HKQuantityTypeIdentifierDietaryVitaminA";
224
- HKQuantityTypeIdentifier["dietaryVitaminB6"] = "HKQuantityTypeIdentifierDietaryVitaminB6";
225
- HKQuantityTypeIdentifier["dietaryVitaminB12"] = "HKQuantityTypeIdentifierDietaryVitaminB12";
226
- HKQuantityTypeIdentifier["dietaryVitaminC"] = "HKQuantityTypeIdentifierDietaryVitaminC";
227
- HKQuantityTypeIdentifier["dietaryVitaminD"] = "HKQuantityTypeIdentifierDietaryVitaminD";
228
- HKQuantityTypeIdentifier["dietaryVitaminE"] = "HKQuantityTypeIdentifierDietaryVitaminE";
229
- HKQuantityTypeIdentifier["dietaryVitaminK"] = "HKQuantityTypeIdentifierDietaryVitaminK";
230
- HKQuantityTypeIdentifier["dietaryCalcium"] = "HKQuantityTypeIdentifierDietaryCalcium";
231
- HKQuantityTypeIdentifier["dietaryIron"] = "HKQuantityTypeIdentifierDietaryIron";
232
- HKQuantityTypeIdentifier["dietaryThiamin"] = "HKQuantityTypeIdentifierDietaryThiamin";
233
- HKQuantityTypeIdentifier["dietaryRiboflavin"] = "HKQuantityTypeIdentifierDietaryRiboflavin";
234
- HKQuantityTypeIdentifier["dietaryNiacin"] = "HKQuantityTypeIdentifierDietaryNiacin";
235
- HKQuantityTypeIdentifier["dietaryFolate"] = "HKQuantityTypeIdentifierDietaryFolate";
236
- HKQuantityTypeIdentifier["dietaryBiotin"] = "HKQuantityTypeIdentifierDietaryBiotin";
237
- HKQuantityTypeIdentifier["dietaryPantothenicAcid"] = "HKQuantityTypeIdentifierDietaryPantothenicAcid";
238
- HKQuantityTypeIdentifier["dietaryPhosphorus"] = "HKQuantityTypeIdentifierDietaryPhosphorus";
239
- HKQuantityTypeIdentifier["dietaryIodine"] = "HKQuantityTypeIdentifierDietaryIodine";
240
- HKQuantityTypeIdentifier["dietaryMagnesium"] = "HKQuantityTypeIdentifierDietaryMagnesium";
241
- HKQuantityTypeIdentifier["dietaryZinc"] = "HKQuantityTypeIdentifierDietaryZinc";
242
- HKQuantityTypeIdentifier["dietarySelenium"] = "HKQuantityTypeIdentifierDietarySelenium";
243
- HKQuantityTypeIdentifier["dietaryCopper"] = "HKQuantityTypeIdentifierDietaryCopper";
244
- HKQuantityTypeIdentifier["dietaryManganese"] = "HKQuantityTypeIdentifierDietaryManganese";
245
- HKQuantityTypeIdentifier["dietaryChromium"] = "HKQuantityTypeIdentifierDietaryChromium";
246
- HKQuantityTypeIdentifier["dietaryMolybdenum"] = "HKQuantityTypeIdentifierDietaryMolybdenum";
247
- HKQuantityTypeIdentifier["dietaryChloride"] = "HKQuantityTypeIdentifierDietaryChloride";
248
- HKQuantityTypeIdentifier["dietaryPotassium"] = "HKQuantityTypeIdentifierDietaryPotassium";
249
- HKQuantityTypeIdentifier["dietaryCaffeine"] = "HKQuantityTypeIdentifierDietaryCaffeine";
250
- HKQuantityTypeIdentifier["dietaryWater"] = "HKQuantityTypeIdentifierDietaryWater";
251
- HKQuantityTypeIdentifier["sixMinuteWalkTestDistance"] = "HKQuantityTypeIdentifierSixMinuteWalkTestDistance";
252
- HKQuantityTypeIdentifier["walkingSpeed"] = "HKQuantityTypeIdentifierWalkingSpeed";
253
- HKQuantityTypeIdentifier["walkingStepLength"] = "HKQuantityTypeIdentifierWalkingStepLength";
254
- HKQuantityTypeIdentifier["walkingAsymmetryPercentage"] = "HKQuantityTypeIdentifierWalkingAsymmetryPercentage";
255
- HKQuantityTypeIdentifier["walkingDoubleSupportPercentage"] = "HKQuantityTypeIdentifierWalkingDoubleSupportPercentage";
256
- HKQuantityTypeIdentifier["stairAscentSpeed"] = "HKQuantityTypeIdentifierStairAscentSpeed";
257
- HKQuantityTypeIdentifier["stairDescentSpeed"] = "HKQuantityTypeIdentifierStairDescentSpeed";
258
- HKQuantityTypeIdentifier["uvExposure"] = "HKQuantityTypeIdentifierUvExposure";
259
- })(HKQuantityTypeIdentifier || (exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier = {}));
260
-
261
286
  let HKAuthorizationRequestStatus;
262
287
  exports.HKAuthorizationRequestStatus = HKAuthorizationRequestStatus;
263
288
 
@@ -514,14 +539,6 @@ exports.HKCharacteristicTypeIdentifier = HKCharacteristicTypeIdentifier;
514
539
  HKCharacteristicTypeIdentifier["wheelchairUse"] = "HKCharacteristicTypeIdentifierWheelchairUse";
515
540
  })(HKCharacteristicTypeIdentifier || (exports.HKCharacteristicTypeIdentifier = HKCharacteristicTypeIdentifier = {}));
516
541
 
517
- let HKCorrelationTypeIdentifier;
518
- exports.HKCorrelationTypeIdentifier = HKCorrelationTypeIdentifier;
519
-
520
- (function (HKCorrelationTypeIdentifier) {
521
- HKCorrelationTypeIdentifier["bloodPressure"] = "HKCorrelationTypeIdentifierBloodPressure";
522
- HKCorrelationTypeIdentifier["food"] = "HKCorrelationTypeIdentifierFood";
523
- })(HKCorrelationTypeIdentifier || (exports.HKCorrelationTypeIdentifier = HKCorrelationTypeIdentifier = {}));
524
-
525
542
  let HKUpdateFrequency;
526
543
  exports.HKUpdateFrequency = HKUpdateFrequency;
527
544
 
@@ -532,6 +549,10 @@ exports.HKUpdateFrequency = HKUpdateFrequency;
532
549
  HKUpdateFrequency[HKUpdateFrequency["weekly"] = 4] = "weekly";
533
550
  })(HKUpdateFrequency || (exports.HKUpdateFrequency = HKUpdateFrequency = {}));
534
551
 
552
+ const HealthkitAuthorization = { ...HKCharacteristicTypeIdentifier,
553
+ ...HKSampleTypeIdentifier
554
+ };
555
+ exports.HealthkitAuthorization = HealthkitAuthorization;
535
556
  const Native = _reactNative.NativeModules.ReactNativeHealthkit;
536
557
  const EventEmitter = new _reactNative.NativeEventEmitter(_reactNative.NativeModules.ReactNativeHealthkit);
537
558
  exports.EventEmitter = EventEmitter;
@@ -1 +1 @@
1
- {"version":3,"names":["HKHeartRateMotionContext","HKCategoryTypeIdentifier","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKQuantityTypeIdentifier","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKWheelchairUse","HKUnitSIPrefix","HKUnitSI","HKUnit","HKCharacteristicTypeIdentifier","HKCorrelationTypeIdentifier","HKUpdateFrequency","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import {\n EmitterSubscription,\n NativeEventEmitter,\n NativeModules,\n} from 'react-native';\n\nexport type HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier';\nexport type HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier';\n\nexport type HKSampleTypeIdentifier =\n | HKWorkoutTypeIdentifier\n | HKQuantityTypeIdentifier\n | HKCategoryTypeIdentifier\n | HKAudiogramTypeIdentifier\n | HKCorrelationTypeIdentifier;\n\nexport type TypeToUnitMapping = {\n [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\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 audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n}\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 [key: string]: string | number | boolean | HKQuantity | undefined;\n HKExternalUUID?: string;\n HKTimeZone?: string;\n HKWasUserEntered?: boolean;\n HKDeviceSerialNumber?: string;\n HKUDIDeviceIdentifier?: string;\n HKUDIProductionIdentifier?: string;\n HKDigitalSignature?: string;\n HKDeviceName?: string;\n HKDeviceManufacturerName?: string;\n HKSyncIdentifier?: string;\n HKSyncVersion?: number;\n HKWasTakenInLab?: boolean;\n HKReferenceRangeLowerLimit?: number;\n 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\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /*<TTemperatureUnit extends HKUnit>*/ {\n HKWeatherCondition?: HKWeatherCondition;\n HKWeatherHumidity?: HKQuantity<HKUnit.Percent>;\n // HKWeatherTemperature: HKQuantity<TTemperatureUnit>\n}\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\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\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<T extends HKUnit = HKUnit> = {\n unit: T;\n quantity: number;\n};\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\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\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\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<TUnit extends HKUnit = HKUnit> = {\n averageQuantity?: HKQuantity<TUnit>;\n maximumQuantity?: HKQuantity<TUnit>;\n minimumQuantity?: HKQuantity<TUnit>;\n sumQuantity?: HKQuantity<TUnit>;\n mostRecentQuantity?: HKQuantity<TUnit>;\n mostRecentQuantityDateInterval?: { from: string; to: string };\n duration?: HKQuantity<HKUnit.Seconds>;\n};\n\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleep = 1,\n awake = 2,\n}\n\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValuePresence\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueSleepAnalysis\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueOvulationTestResult\n | number;\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 HKInsulinDeliveryReason: HKInsulinDeliveryReason;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.bloodGlucose\n ? HKGenericMetadata & {\n HKBloodGlucoseMealTime?: number;\n }\n : TQuantityTypeIdentifier extends HKQuantityTypeIdentifier.heartRate\n ? HKGenericMetadata & {\n HKHeartRateMotionContext?: HKHeartRateMotionContext;\n }\n : HKGenericMetadata;\n\nexport type MetadataMapperForCorrelationIdentifier<\n TCorrelationTypeIdentifier = HKCorrelationTypeIdentifier\n> = TCorrelationTypeIdentifier extends HKCorrelationTypeIdentifier.food\n ? HKGenericMetadata & {\n HKFoodType?: string;\n }\n : HKGenericMetadata;\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 HKCategoryTypeIdentifier.mindfulSession\n ? HKCategoryValueNotApplicable\n : T extends HKCategoryTypeIdentifier.intermenstrualBleeding\n ? HKCategoryValueNotApplicable\n : T extends HKCategoryTypeIdentifier.highHeartRateEvent\n ? HKCategoryValueNotApplicable\n : T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\n\nexport type MetadataMapperForCategoryIdentifier<\n T extends HKCategoryTypeIdentifier\n> = T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKGenericMetadata & {\n HKSexualActivityProtectionUsed: boolean;\n }\n : T extends HKCategoryTypeIdentifier.menstrualFlow\n ? HKGenericMetadata & {\n 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 HKUnitSIPrefix {\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}\n\nexport enum HKUnitSI {\n Grams = 'g',\n Joules = 'J',\n Kelvin = 'K',\n Liters = 'l',\n Meters = 'm',\n Pascals = 'Pa',\n Seconds = 's',\n Siemens = 'S',\n}\n\nexport enum HKUnit {\n Grams = 'g',\n Joules = 'J',\n Kelvin = 'K',\n Liters = 'l',\n Meters = 'm',\n Pascals = 'Pa',\n Seconds = 's',\n Siemens = 'S',\n\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n Count = 'count',\n Days = 'd',\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Feet = 'ft',\n Hertz = 'Hz',\n Hours = 'hr',\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n Inches = 'in',\n InternationalUnit = 'IU',\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n Miles = 'mi',\n MillimetersOfMercury = 'mmHg',\n Minutes = 'min',\n Ounces = 'oz',\n Percent = '%',\n Pounds = 'lb',\n SmallCalories = 'cal',\n Stones = 'st',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n Yard = 'yd',\n\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type HKDevice = {\n name: string;\n firmwareVersion: string;\n hardwareVersion: string;\n localIdentifier: string;\n manufacturer: string;\n model: string;\n softwareVersion: string;\n};\n\nexport type HKSource = {\n name: string;\n bundleIdentifier: string;\n};\n\nexport type HKSourceRevision = {\n source: HKSource;\n version: string;\n operatingSystemVersion?: string;\n productType?: string;\n};\n\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends HKUnit = HKUnit\n> = {\n uuid: string;\n device?: HKDevice;\n quantityType: TQuantityIdentifier;\n startDate: string;\n endDate: string;\n quantity: number;\n unit: TUnit;\n metadata: MetadataMapperForQuantityIdentifier<TQuantityIdentifier>;\n sourceRevision?: HKSourceRevision;\n};\n\nexport type HKWorkoutRaw<TEnergy extends HKUnit, TDistance extends HKUnit> = {\n workoutActivityType: HKWorkoutActivityType;\n duration: number;\n totalDistance?: HKQuantity<TDistance>;\n totalEnergyBurned?: HKQuantity<TEnergy>;\n totalSwimmingStrokeCount?: HKQuantity<HKUnit.Count>;\n totalFlightsClimbed?: HKQuantity<HKUnit.Count>;\n startDate: string;\n endDate: string;\n metadata?: HKWorkoutMetadata;\n 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}\n\nexport type WritePermssions = {\n [key in\n | HKCharacteristicTypeIdentifier\n | HKQuantityTypeIdentifier\n | HKCategoryTypeIdentifier]: boolean;\n};\n\nexport type ReadPermssions = {\n [key in\n | HKQuantityTypeIdentifier\n | HKCharacteristicTypeIdentifier\n | HKCategoryTypeIdentifier]: boolean;\n};\n\nexport type HKCategorySampleRaw<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> = {\n uuid: string;\n device?: HKDevice;\n categoryType: T;\n startDate: string;\n endDate: string;\n value: HKCategoryValueForIdentifier<T>;\n metadata: MetadataMapperForCategoryIdentifier<T>;\n sourceRevision?: HKSourceRevision;\n};\n\nexport type HKCorrelationRaw<TIdentifier extends HKCorrelationTypeIdentifier> =\n {\n correlationType: HKCorrelationTypeIdentifier;\n objects: (HKQuantitySampleRaw | HKCategorySampleRaw)[];\n metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>;\n startDate: string;\n endDate: string;\n };\n\ntype QueryId = string;\n\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\n\nexport enum HKUpdateFrequency {\n immediate = 1,\n hourly = 2,\n daily = 3,\n weekly = 4,\n}\n\nexport type WorkoutLocation = {\n longitude: number;\n latitude: number;\n altitude: number;\n speed: number;\n timestamp: number;\n horizontalAccuracy: number;\n speedAccuracy: number;\n verticalAccuracy: number;\n};\n\nexport type WorkoutRoute = {\n locations: WorkoutLocation[];\n HKMetadataKeySyncIdentifier?: string;\n HKMetadataKeySyncVersion?: number;\n};\n\ntype ReactNativeHealthkitTypeNative = {\n isHealthDataAvailable(): Promise<boolean>;\n getBloodType(): Promise<HKBloodType>;\n getDateOfBirth(): Promise<string>;\n getBiologicalSex(): Promise<HKBiologicalSex>;\n getFitzpatrickSkinType(): Promise<HKFitzpatrickSkinType>;\n getWheelchairUse: () => Promise<HKWheelchairUse>;\n\n enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise<boolean>;\n disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise<boolean>;\n disableAllBackgroundDelivery: () => Promise<boolean>;\n\n saveCorrelationSample: <TIdentifier extends HKCorrelationTypeIdentifier>(\n typeIdentifier: TIdentifier,\n samples: Omit<\n HKQuantitySampleRaw | HKCategorySampleRaw,\n 'startDate' | 'endDate' | 'uuid' | 'device'\n >[],\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>\n ) => Promise<boolean>;\n\n saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: Omit<\n HKQuantitySampleRaw,\n 'startDate' | 'endDate' | 'uuid' | 'device'\n >[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise<boolean>;\n\n queryCorrelationSamples: <TIdentifier extends HKCorrelationTypeIdentifier>(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise<HKCorrelationRaw<TIdentifier>[]>;\n\n subscribeToObserverQuery(\n identifier: HKSampleTypeIdentifier\n ): Promise<QueryId>;\n unsubscribeQuery(queryId: QueryId): Promise<boolean>;\n authorizationStatusFor(\n type: HKSampleTypeIdentifier | HKCharacteristicTypeIdentifier\n ): Promise<boolean>;\n getRequestStatusForAuthorization(\n write: WritePermssions | {},\n read: ReadPermssions | {}\n ): Promise<HKAuthorizationRequestStatus>;\n requestAuthorization(\n write: WritePermssions | {},\n read: ReadPermssions | {}\n ): Promise<boolean>;\n saveQuantitySample: (\n identifier: HKQuantityTypeIdentifier,\n unit: HKUnit,\n value: number,\n start: string,\n end: string,\n metadata: Object\n ) => Promise<boolean>;\n queryWorkoutSamples: <TEnergy extends HKUnit, TDistance extends HKUnit>(\n energyUnit: TEnergy,\n distanceUnit: TDistance,\n from: string,\n to: string,\n limit: Number,\n ascending: boolean\n ) => Promise<HKWorkoutRaw<TEnergy, TDistance>[]>;\n queryCategorySamples: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n from: string,\n to: string,\n limit: Number,\n ascending: boolean\n ) => Promise<HKCategorySampleRaw<T>[]>;\n queryQuantitySamples: <\n TUnit extends HKUnit,\n TIdentifier extends HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: Number,\n ascending: boolean\n ) => Promise<HKQuantitySampleRaw<TIdentifier, TUnit>[]>;\n saveCategorySample: <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n value: HKCategoryValueForIdentifier<T>,\n start: string,\n end: string,\n metadata: Object\n ) => Promise<boolean>;\n queryStatisticsForQuantity: <TUnit extends HKUnit>(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: HKStatisticsOptions[]\n ) => Promise<QueryStatisticsResponseRaw<TUnit>>;\n getPreferredUnits: (\n identifiers: HKQuantityTypeIdentifier[]\n ) => Promise<TypeToUnitMapping>;\n getWorkoutRoutes: (workoutUUID: string) => Promise<WorkoutRoute[]>;\n};\n\nconst Native =\n NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative;\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n typeIdentifier: HKSampleTypeIdentifier;\n}) => void;\n\ninterface HealthkitEventEmitter extends NativeEventEmitter {\n addListener: (\n eventType: 'onChange',\n callback: OnChangeCallback\n ) => EmitterSubscription;\n}\n\nexport const EventEmitter = new NativeEventEmitter(\n NativeModules.ReactNativeHealthkit\n) as HealthkitEventEmitter;\n\nexport default Native;\n"],"mappings":";;;;;;;AAAA;;IAoBYA,wB;;;WAAAA,wB;EAAAA,wB,CAAAA,wB;EAAAA,wB,CAAAA,wB;EAAAA,wB,CAAAA,wB;GAAAA,wB,wCAAAA,wB;;IAMAC,wB;;;WAAAA,wB;EAAAA,wB;EAAAA,wB;EAAAA,wB;EAAAA,wB;EAAAA,wB;EAAAA,wB;EAAAA,wB;EAAAA,wB;EAAAA,wB;EAAAA,wB;EAAAA,wB;EAAAA,wB;EAAAA,wB;GAAAA,wB,wCAAAA,wB;;IAgBAC,6B;;;WAAAA,6B;EAAAA,6B,CAAAA,6B;EAAAA,6B,CAAAA,6B;GAAAA,6B,6CAAAA,6B;;IAKAC,qB;;;WAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,qB;EAAAA,qB,CAAAA,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0BAAA,CAAcC,oBADhB;AAgBO,MAAMC,YAAY,GAAG,IAAIC,+BAAJ,CAC1BH,0BAAA,CAAcC,oBADY,CAArB;;eAIQF,M"}
1
+ {"version":3,"names":["HKWorkoutTypeIdentifier","HKAudiogramTypeIdentifier","HKWorkoutRouteTypeIdentifier","HKDataTypeIdentifierHeartbeatSeries","HKQuantityTypeIdentifier","HKHeartRateMotionContext","HKCorrelationTypeIdentifier","HKCategoryTypeIdentifier","HKSampleTypeIdentifier","audiogram","heartbeatSeries","workoutRoute","workoute","HKCategoryValueAppleStandHour","HKWorkoutActivityType","HKWeatherCondition","HKAuthorizationRequestStatus","HKAuthorizationStatus","HKBloodType","HKBiologicalSex","HKFitzpatrickSkinType","HKStatisticsOptions","HKCategoryValueCervicalMucusQuality","HKCategoryValueMenstrualFlow","HKCategoryValueOvulationTestResult","HKCategoryValueSleepAnalysis","HKCategoryValueAppetiteChanges","HKCategoryValuePresence","HKCategoryValueSeverity","HKCategoryValueNotApplicable","HKInsulinDeliveryReason","HKWheelchairUse","HKUnitSIPrefix","HKUnitSI","HKUnit","HKCharacteristicTypeIdentifier","HKUpdateFrequency","HealthkitAuthorization","Native","NativeModules","ReactNativeHealthkit","EventEmitter","NativeEventEmitter"],"sources":["native-types.ts"],"sourcesContent":["import {\n NativeEventEmitter,\n NativeModules,\n} from 'react-native'\n\nimport type { EmitterSubscription } from 'react-native'\nimport type { ValueOf } from 'type-fest'\n\nexport const HKWorkoutTypeIdentifier = 'HKWorkoutTypeIdentifier' as const\nexport const HKAudiogramTypeIdentifier = 'HKAudiogramTypeIdentifier' as const\nexport const HKWorkoutRouteTypeIdentifier = 'HKWorkoutRouteTypeIdentifier' as const\nexport const HKDataTypeIdentifierHeartbeatSeries = 'HKDataTypeIdentifierHeartbeatSeries' as const\n\n// Straight mapping to https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier\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\nexport type TypeToUnitMapping = { readonly\n [key in HKQuantityTypeIdentifier]: HKUnit;\n};\n\nexport enum HKHeartRateMotionContext {\n active = 2,\n notSet = 0,\n sedentary = 1,\n}\n\nexport enum HKCorrelationTypeIdentifier {\n bloodPressure = 'HKCorrelationTypeIdentifierBloodPressure',\n food = 'HKCorrelationTypeIdentifierFood',\n}\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 audioExposureEvent = 'HKCategoryTypeIdentifierAudioExposureEvent',\n toothbrushingEvent = 'HKCategoryTypeIdentifierToothbrushingEvent',\n}\n\nexport const HKSampleTypeIdentifier = {\n ...HKCategoryTypeIdentifier,\n ...HKCorrelationTypeIdentifier,\n ...HKQuantityTypeIdentifier,\n audiogram: HKAudiogramTypeIdentifier,\n heartbeatSeries: HKDataTypeIdentifierHeartbeatSeries,\n workoutRoute: HKWorkoutRouteTypeIdentifier,\n workoute: HKWorkoutTypeIdentifier,\n}\n\nexport type SampleTypeIdentifier = ValueOf<typeof HKSampleTypeIdentifier>;\n\nexport type HealthkitReadAuthorization = ValueOf<typeof HealthkitAuthorization>\nexport type HealthkitWriteAuthorization = ValueOf<typeof HealthkitAuthorization>\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\nexport interface HKWorkoutMetadata\n extends HKGenericMetadata /* <TTemperatureUnit extends HKUnit> */ {\n readonly HKWeatherCondition?: HKWeatherCondition;\n readonly HKWeatherHumidity?: HKQuantity<HKUnit.Percent>;\n // HKWeatherTemperature: HKQuantity<TTemperatureUnit>\n}\n\nexport enum HKAuthorizationRequestStatus {\n unknown = 0,\n shouldRequest = 1,\n unnecessary = 2,\n}\n\nexport enum HKAuthorizationStatus {\n notDetermined = 0,\n sharingDenied = 1,\n sharingAuthorized = 2,\n}\n\nexport type HKQuantity<T extends HKUnit = HKUnit> = {\n readonly unit: T;\n readonly quantity: number;\n};\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\nexport enum HKBiologicalSex {\n notSet = 0,\n female = 1,\n male = 2,\n other = 3,\n}\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\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<TUnit extends HKUnit = HKUnit> = {\n readonly averageQuantity?: HKQuantity<TUnit>;\n readonly maximumQuantity?: HKQuantity<TUnit>;\n readonly minimumQuantity?: HKQuantity<TUnit>;\n readonly sumQuantity?: HKQuantity<TUnit>;\n readonly mostRecentQuantity?: HKQuantity<TUnit>;\n readonly mostRecentQuantityDateInterval?: { readonly from: string; readonly to: string };\n readonly duration?: HKQuantity<HKUnit.Seconds>;\n};\n\nexport enum HKCategoryValueCervicalMucusQuality {\n dry = 1,\n sticky = 2,\n creamy = 3,\n watery = 4,\n eggWhite = 5,\n}\n\nexport enum HKCategoryValueMenstrualFlow {\n unspecified = 1,\n none = 5,\n light = 2,\n medium = 3,\n heavy = 4,\n}\n\nexport enum HKCategoryValueOvulationTestResult {\n negative = 1,\n luteinizingHormoneSurge = 2,\n indeterminate = 3,\n estrogenSurge = 4,\n}\n\nexport enum HKCategoryValueSleepAnalysis {\n inBed = 0,\n asleep = 1,\n awake = 2,\n}\n\nexport enum HKCategoryValueAppetiteChanges {\n decreased = 2,\n increased = 3,\n noChange = 1,\n unspecified = 0,\n}\n\nexport enum HKCategoryValuePresence {\n notPresent = 1,\n present = 0,\n}\n\nexport enum HKCategoryValueSeverity {\n notPresent = 1,\n mild = 2,\n moderate = 3,\n severe = 4,\n unspecified = 0,\n}\n\nexport enum HKCategoryValueNotApplicable {\n notApplicable = 0,\n}\n\nexport type HKCategoryValue =\n | HKCategoryValueAppetiteChanges\n | HKCategoryValueCervicalMucusQuality\n | HKCategoryValueMenstrualFlow\n | HKCategoryValueOvulationTestResult\n | HKCategoryValuePresence\n | HKCategoryValuePresence\n | HKCategoryValueSeverity\n | HKCategoryValueSleepAnalysis\n | number;\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 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 HKCategoryTypeIdentifier.mindfulSession\n ? HKCategoryValueNotApplicable\n : T extends HKCategoryTypeIdentifier.intermenstrualBleeding\n ? HKCategoryValueNotApplicable\n : T extends HKCategoryTypeIdentifier.highHeartRateEvent\n ? HKCategoryValueNotApplicable\n : T extends HKCategoryTypeIdentifier.sexualActivity\n ? HKCategoryValueNotApplicable\n : T extends HKCategoryTypeIdentifier.appleStandHour\n ? HKCategoryValueAppleStandHour\n : number;\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 HKUnitSIPrefix {\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}\n\nexport enum HKUnitSI {\n Grams = 'g',\n Joules = 'J',\n Kelvin = 'K',\n Liters = 'l',\n Meters = 'm',\n Pascals = 'Pa',\n Seconds = 's',\n Siemens = 'S',\n}\n\nexport enum HKUnit {\n Grams = 'g',\n Joules = 'J',\n Kelvin = 'K',\n Liters = 'l',\n Meters = 'm',\n Pascals = 'Pa',\n Seconds = 's',\n Siemens = 'S',\n\n Atmospheres = 'atm',\n CentimetersOfWater = 'cmAq',\n Count = 'count',\n Days = 'd',\n DecibelHearingLevel = 'dBHL',\n DecibelSoundPressureLevel = 'dBASPL',\n DegreesCelsius = 'degC',\n DegreesFahrenheit = 'degF',\n Feet = 'ft',\n Hertz = 'Hz',\n Hours = 'hr',\n ImperialCup = 'cup_imp',\n ImperialFluidOunces = 'fl_oz_imp',\n ImperialPint = 'pt_imp',\n Inches = 'in',\n InternationalUnit = 'IU',\n Kilocalories = 'kcal',\n LargeCalories = 'Cal',\n Miles = 'mi',\n MillimetersOfMercury = 'mmHg',\n Minutes = 'min',\n Ounces = 'oz',\n Percent = '%',\n Pounds = 'lb',\n SmallCalories = 'cal',\n Stones = 'st',\n USCup = 'cup_us',\n USFluidOunces = 'fl_oz_us',\n USPint = 'pt_us',\n Yard = 'yd',\n\n GlucoseMmolPerL = 'mmol<180.15588000005408>/l',\n GlucoseMgPerDl = 'mg/dL',\n}\n\nexport type HKDevice = {\n readonly name: string;\n readonly firmwareVersion: string;\n readonly hardwareVersion: string;\n readonly localIdentifier: string;\n readonly manufacturer: string;\n readonly model: string;\n readonly softwareVersion: string;\n};\n\nexport type HKSource = {\n readonly name: string;\n readonly bundleIdentifier: string;\n};\n\nexport type HKSourceRevision = {\n readonly source: HKSource;\n readonly version: string;\n readonly operatingSystemVersion?: string;\n readonly productType?: string;\n};\n\nexport type HKQuantitySampleRaw<\n TQuantityIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends HKUnit = HKUnit\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 HKWorkoutRaw<TEnergy extends HKUnit, TDistance extends HKUnit> = {\n readonly uuid: string;\n readonly device?: HKDevice;\n readonly workoutActivityType: HKWorkoutActivityType;\n readonly duration: number;\n readonly totalDistance?: HKQuantity<TDistance>;\n readonly totalEnergyBurned?: HKQuantity<TEnergy>;\n readonly totalSwimmingStrokeCount?: HKQuantity<HKUnit.Count>;\n readonly totalFlightsClimbed?: HKQuantity<HKUnit.Count>;\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}\n\nexport type WritePermissions = {\n readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | HKQuantityTypeIdentifier]: boolean;\n};\n\nexport type ReadPermissions = {\n readonly [key in HKCategoryTypeIdentifier | HKCharacteristicTypeIdentifier | 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 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\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};\n\nexport type WorkoutRoute = {\n readonly locations: readonly WorkoutLocation[];\n readonly HKMetadataKeySyncIdentifier?: string;\n readonly HKMetadataKeySyncVersion?: number;\n};\n\nexport const HealthkitAuthorization = { ...HKCharacteristicTypeIdentifier, ...HKSampleTypeIdentifier }\n\ntype ReactNativeHealthkitTypeNative = {\n isHealthDataAvailable(): 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 readonly enableBackgroundDelivery: (\n typeIdentifier: ValueOf<typeof HKSampleTypeIdentifier>,\n updateFrequency: HKUpdateFrequency\n ) => Promise<boolean>;\n readonly disableBackgroundDelivery: (\n typeIdentifier: ValueOf<typeof HKSampleTypeIdentifier>,\n ) => Promise<boolean>;\n readonly disableAllBackgroundDelivery: () => Promise<boolean>;\n\n readonly saveCorrelationSample: <TIdentifier extends HKCorrelationTypeIdentifier>(\n typeIdentifier: TIdentifier,\n samples: readonly Omit<\n HKCategorySampleRaw | HKQuantitySampleRaw,\n 'device' | 'endDate' | 'startDate' | 'uuid'\n >[],\n start: string,\n end: string,\n metadata: MetadataMapperForCorrelationIdentifier<TIdentifier>\n ) => Promise<boolean>;\n\n readonly saveWorkoutSample: (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly Omit<\n HKQuantitySampleRaw,\n 'device' | 'endDate' | 'startDate' | 'uuid'\n >[],\n start: string,\n end: string,\n metadata: HKWorkoutMetadata\n ) => Promise<boolean>;\n\n readonly queryCorrelationSamples: <TIdentifier extends HKCorrelationTypeIdentifier>(\n typeIdentifier: TIdentifier,\n from: string,\n to: string\n ) => Promise<readonly HKCorrelationRaw<TIdentifier>[]>;\n\n subscribeToObserverQuery(\n identifier: ValueOf<typeof HKSampleTypeIdentifier>\n ): Promise<QueryId>;\n unsubscribeQuery(queryId: QueryId): Promise<boolean>;\n authorizationStatusFor(\n type: ValueOf<keyof typeof HealthkitAuthorization>\n ): Promise<boolean>;\n getRequestStatusForAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise<HKAuthorizationRequestStatus>;\n requestAuthorization(\n write: WritePermissions,\n read: ReadPermissions\n ): Promise<boolean>;\n readonly saveQuantitySample: (\n identifier: HKQuantityTypeIdentifier,\n unit: HKUnit,\n value: number,\n start: string,\n end: string,\n metadata: unknown\n ) => Promise<boolean>;\n readonly queryWorkoutSamples: <TEnergy extends HKUnit, TDistance extends HKUnit>(\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 TUnit extends HKUnit,\n TIdentifier extends HKQuantityTypeIdentifier\n >(\n identifier: TIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n limit: number,\n ascending: boolean\n ) => Promise<readonly HKQuantitySampleRaw<TIdentifier, TUnit>[]>;\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: <TUnit extends HKUnit>(\n identifier: HKQuantityTypeIdentifier,\n unit: TUnit,\n from: string,\n to: string,\n options: readonly HKStatisticsOptions[]\n ) => Promise<QueryStatisticsResponseRaw<TUnit>>;\n readonly getPreferredUnits: (\n identifiers: readonly HKQuantityTypeIdentifier[]\n ) => Promise<TypeToUnitMapping>;\n readonly getWorkoutRoutes: (workoutUUID: string) => Promise<readonly WorkoutRoute[]>;\n};\n\nconst Native = NativeModules.ReactNativeHealthkit as ReactNativeHealthkitTypeNative\n\ntype OnChangeCallback = ({\n typeIdentifier,\n}: {\n readonly typeIdentifier: ValueOf<typeof 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,\n) as HealthkitEventEmitter\n\nexport default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GF,8BAAL;EAAqC,GAAG3B;AAAxC,CAA/B;;AAoHP,MAAM8B,MAAM,GAAGC,0BAAA,CAAcC,oBAA7B;AAeO,MAAMC,YAAY,GAAG,IAAIC,+BAAJ,CAC1BH,0BAAA,CAAcC,oBADY,CAArB;;eAIQF,M"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n HKAuthorizationRequestStatus,\n HKBiologicalSex,\n HKBloodType,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCategoryValueForIdentifier,\n HKCharacteristicTypeIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKFitzpatrickSkinType,\n HKQuantitySampleRaw,\n HKQuantityTypeIdentifier,\n HKSampleTypeIdentifier,\n HKStatisticsOptions,\n HKUnit,\n HKUnitSI,\n HKUnitSIPrefix,\n HKUpdateFrequency,\n HKWheelchairUse,\n HKWorkoutActivityType,\n HKWorkoutMetadata,\n HKWorkoutRaw,\n MetadataMapperForCategoryIdentifier,\n MetadataMapperForCorrelationIdentifier,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n WorkoutRoute,\n} from './native-types';\n\nexport interface QueryWorkoutsOptions<\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n> extends GenericQueryOptions {\n energyUnit?: TEnergy;\n distanceUnit?: TDistance;\n}\n\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit<HKCategorySampleRaw<T>, 'startDate' | 'endDate'> {\n startDate: Date;\n endDate: Date;\n}\n\nexport type GenericQueryOptions = {\n from?: Date;\n to?: Date;\n limit?: Number;\n ascending?: boolean;\n};\n\nexport interface HKWorkout<\n TEnergy extends HKUnit = HKUnit,\n TDistance extends HKUnit = HKUnit\n> extends Omit<HKWorkoutRaw<TEnergy, TDistance>, 'startDate' | 'endDate'> {\n startDate: Date;\n endDate: Date;\n}\n\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends HKUnit = HKUnit\n> extends Omit<\n HKQuantitySampleRaw<TIdentifier, TUnit>,\n 'startDate' | 'endDate'\n > {\n startDate: Date;\n endDate: Date;\n}\n\nexport interface QueryStatisticsResponse<T extends HKUnit = HKUnit>\n extends Omit<\n QueryStatisticsResponseRaw<T>,\n 'mostRecentQuantityDateInterval'\n > {\n mostRecentQuantityDateInterval?: { from: Date; to: Date };\n}\n\ntype UnsubscribeFunction = () => Promise<boolean>;\n\nexport type IsHealthDataAvailableFn = () => Promise<boolean>;\n\nexport type GetBloodTypeFn = () => Promise<HKBloodType>;\n\nexport type GetDateOfBirthFn = () => Promise<Date>;\nexport type GetBiologicalSexFn = () => Promise<HKBiologicalSex>;\nexport type GetWheelchairUseFn = () => Promise<HKWheelchairUse>;\nexport type GetFitzpatrickSkinTypeFn = () => Promise<HKFitzpatrickSkinType>;\n\nexport type QueryStatisticsForQuantityFn = <TUnit extends HKUnit>(\n identifier: HKQuantityTypeIdentifier,\n options: HKStatisticsOptions[],\n from: Date,\n to?: Date,\n unit?: TUnit\n) => Promise<QueryStatisticsResponse<TUnit>>;\n\nexport type QueryWorkoutsFn = <\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n>(\n options: QueryWorkoutsOptions<TEnergy, TDistance>\n) => Promise<HKWorkout<TEnergy, TDistance>[]>;\n\nexport type AuthorizationStatusForFn = (\n type: HKSampleTypeIdentifier | HKCharacteristicTypeIdentifier\n) => Promise<boolean>;\n\nexport type QueryCategorySamplesFn = <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n options: GenericQueryOptions\n) => Promise<HKCategorySample<T>[]>;\n\nexport type GetRequestStatusForAuthorizationFn = (\n read: (HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier)[],\n write?: HKSampleTypeIdentifier[]\n) => Promise<HKAuthorizationRequestStatus>;\n\nexport type RequestAuthorizationFn = (\n read: (HKCharacteristicTypeIdentifier | HKSampleTypeIdentifier)[],\n write?: HKSampleTypeIdentifier[]\n) => Promise<boolean>;\n\nexport type SaveQuantitySampleFn = <TUnit extends HKQuantityTypeIdentifier>(\n identifier: TUnit,\n unit: HKUnit,\n value: number,\n options?: {\n start?: Date;\n end?: Date;\n metadata?: MetadataMapperForQuantityIdentifier<TUnit>;\n }\n) => Promise<boolean>;\n\nexport type QueryQuantitySamplesFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends HKUnit = HKUnit\n>(\n identifier: TIdentifier,\n options: GenericQueryOptions & { unit?: TUnit }\n) => Promise<HKQuantitySample<TIdentifier, TUnit>[]>;\n\nexport type SubscribeToChangesFn = (\n identifier: HKSampleTypeIdentifier,\n callback: () => void\n) => Promise<UnsubscribeFunction>;\n\nexport type SaveCategorySampleFn = <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n value: HKCategoryValueForIdentifier<T>,\n options?: {\n start?: Date;\n end?: Date;\n metadata?: MetadataMapperForCategoryIdentifier<T>;\n }\n) => Promise<boolean>;\n\nexport type GetMostRecentCategorySampleFn = <\n T extends HKCategoryTypeIdentifier\n>(\n identifier: T\n) => Promise<HKCategorySample<T> | null>;\n\nexport type MostRecentCategorySampleHook = <T extends HKCategoryTypeIdentifier>(\n identifier: T\n) => HKCategorySample<T> | null;\n\nexport type MostRecentCorrelationSampleHook = <\n T extends HKCorrelationTypeIdentifier\n>(\n identifer: T\n) => HKCorrelation<T> | null;\n\nexport type GetMostRecentQuantitySampleFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends HKUnit\n>(\n identifier: TIdentifier,\n unit?: TUnit\n) => Promise<HKQuantitySample<TIdentifier, TUnit>>;\n\nexport type MostRecentQuantitySampleHook = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends HKUnit\n>(\n identifier: TIdentifier,\n unit?: TUnit\n) => HKQuantitySample<TIdentifier, TUnit> | null;\n\nexport type GetMostRecentWorkoutFn = <\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n>(\n options?: Pick<\n QueryWorkoutsOptions<TEnergy, TDistance>,\n 'distanceUnit' | 'energyUnit'\n >\n) => Promise<HKWorkout<TEnergy, TDistance> | null>;\n\nexport type MostRecentWorkoutHook = <\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n>(\n options?: Pick<\n QueryWorkoutsOptions<TEnergy, TDistance>,\n 'distanceUnit' | 'energyUnit'\n >\n) => HKWorkout<TEnergy, TDistance> | null;\n\nexport type GetPreferredUnitsFn = (\n identifiers: HKQuantityTypeIdentifier[]\n) => Promise<HKUnit[]>;\n\nexport type GetPreferredUnitFn = (\n identifier: HKQuantityTypeIdentifier\n) => Promise<HKUnit>;\n\nexport type SaveCorrelationSampleFn = <\n TIdentifier extends HKCorrelationTypeIdentifier\n>(\n typeIdentifier: TIdentifier,\n samples: (\n | Omit<HKCategorySample, 'startDate' | 'endDate' | 'uuid' | 'device'>\n | Omit<HKQuantitySample, 'startDate' | 'endDate' | 'uuid' | 'device'>\n )[],\n options?: {\n start?: Date;\n end?: Date;\n metadata?: MetadataMapperForCorrelationIdentifier<TIdentifier>;\n }\n) => Promise<boolean>;\n\nexport type SaveWorkoutSampleFn = (\n typeIdentifier: HKWorkoutActivityType,\n quantities: Omit<\n HKQuantitySample,\n 'startDate' | 'endDate' | 'uuid' | 'device'\n >[],\n start: Date,\n options?: {\n end?: Date;\n metadata?: HKWorkoutMetadata;\n }\n) => Promise<boolean>;\n\nexport interface HKCorrelation<TIdentifier extends HKCorrelationTypeIdentifier>\n extends Omit<\n HKCorrelationRaw<TIdentifier>,\n 'startDate' | 'endDate' | 'objects'\n > {\n objects: (HKQuantitySample | HKCategorySample)[];\n startDate: Date;\n endDate: Date;\n}\n\nexport type QueryCorrelationSamplesFn = <\n TIdentifier extends HKCorrelationTypeIdentifier\n>(\n typeIdentifier: TIdentifier,\n options: Omit<GenericQueryOptions, 'limit' | 'ascending'>\n) => Promise<HKCorrelation<TIdentifier>[]>;\n\nexport type SubscribeToChangesHook = <\n TIdentifier extends HKSampleTypeIdentifier\n>(\n identifier: TIdentifier,\n onChange: () => void,\n runInitialUpdate?: boolean\n) => void;\n\nexport type GetWorkoutRoutesFn = (\n workoutUUID: string\n) => Promise<WorkoutRoute[]>;\n\nexport type ReactNativeHealthkit = {\n authorizationStatusFor: AuthorizationStatusForFn;\n\n getBiologicalSex: GetBiologicalSexFn;\n getBloodType: GetBloodTypeFn;\n getDateOfBirth: GetDateOfBirthFn;\n getFitzpatrickSkinType: GetFitzpatrickSkinTypeFn;\n getMostRecentQuantitySample: GetMostRecentQuantitySampleFn;\n getMostRecentCategorySample: GetMostRecentCategorySampleFn;\n getMostRecentWorkout: GetMostRecentWorkoutFn;\n getPreferredUnit: GetPreferredUnitFn;\n getPreferredUnits: GetPreferredUnitsFn;\n getRequestStatusForAuthorization: GetRequestStatusForAuthorizationFn;\n getWheelchairUse: GetWheelchairUseFn;\n getWorkoutRoutes: GetWorkoutRoutesFn;\n\n buildUnitWithPrefix: (prefix: HKUnitSIPrefix, unit: HKUnitSI) => HKUnit;\n\n isHealthDataAvailable: IsHealthDataAvailableFn;\n\n queryCategorySamples: QueryCategorySamplesFn;\n queryQuantitySamples: QueryQuantitySamplesFn;\n queryStatisticsForQuantity: QueryStatisticsForQuantityFn;\n queryWorkouts: QueryWorkoutsFn;\n queryCorrelationSamples: QueryCorrelationSamplesFn;\n\n requestAuthorization: RequestAuthorizationFn;\n\n saveCategorySample: SaveCategorySampleFn;\n saveQuantitySample: SaveQuantitySampleFn;\n saveCorrelationSample: SaveCorrelationSampleFn;\n saveWorkoutSample: SaveWorkoutSampleFn;\n enableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise<boolean>;\n disableBackgroundDelivery: (\n typeIdentifier: HKSampleTypeIdentifier\n ) => Promise<boolean>;\n disableAllBackgroundDelivery: () => Promise<boolean>;\n\n subscribeToChanges: SubscribeToChangesFn;\n\n useMostRecentWorkout: MostRecentWorkoutHook;\n useMostRecentCategorySample: MostRecentCategorySampleHook;\n useMostRecentQuantitySample: MostRecentQuantitySampleHook;\n\n useSubscribeToChanges: SubscribeToChangesHook;\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n HealthkitReadAuthorization,\n HealthkitWriteAuthorization,\n HKAuthorizationRequestStatus,\n HKBiologicalSex,\n HKBloodType,\n HKCategorySampleRaw,\n HKCategoryTypeIdentifier,\n HKCategoryValueForIdentifier,\n HKCorrelationRaw,\n HKCorrelationTypeIdentifier,\n HKFitzpatrickSkinType,\n HKQuantitySampleRaw,\n HKQuantityTypeIdentifier,\n HKStatisticsOptions,\n HKUnit,\n HKUnitSI,\n HKUnitSIPrefix,\n HKUpdateFrequency,\n HKWheelchairUse,\n HKWorkoutActivityType,\n HKWorkoutMetadata,\n HKWorkoutRaw,\n MetadataMapperForCategoryIdentifier,\n MetadataMapperForCorrelationIdentifier,\n MetadataMapperForQuantityIdentifier,\n QueryStatisticsResponseRaw,\n SampleTypeIdentifier,\n WorkoutRoute,\n} from './native-types'\n\nexport interface QueryWorkoutsOptions<\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n> extends GenericQueryOptions {\n readonly energyUnit?: TEnergy;\n readonly distanceUnit?: TDistance;\n}\n\nexport interface HKCategorySample<\n T extends HKCategoryTypeIdentifier = HKCategoryTypeIdentifier\n> extends Omit<HKCategorySampleRaw<T>, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport type GenericQueryOptions = {\n readonly from?: Date;\n readonly to?: Date;\n readonly limit?: number;\n readonly ascending?: boolean;\n};\n\nexport interface HKWorkout<\n TEnergy extends HKUnit = HKUnit,\n TDistance extends HKUnit = HKUnit\n> extends Omit<HKWorkoutRaw<TEnergy, TDistance>, 'endDate' | 'startDate'> {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface HKQuantitySample<\n TIdentifier extends HKQuantityTypeIdentifier = HKQuantityTypeIdentifier,\n TUnit extends HKUnit = HKUnit\n> extends Omit<\n HKQuantitySampleRaw<TIdentifier, TUnit>,\n 'endDate' | 'startDate'\n > {\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport interface QueryStatisticsResponse<T extends HKUnit = HKUnit>\n extends Omit<\n QueryStatisticsResponseRaw<T>,\n 'mostRecentQuantityDateInterval'\n > {\n readonly mostRecentQuantityDateInterval?: { readonly from: Date; readonly to: Date };\n}\n\ntype UnsubscribeFunction = () => Promise<boolean>;\n\nexport type IsHealthDataAvailableFn = () => Promise<boolean>;\n\nexport type GetBloodTypeFn = () => Promise<HKBloodType>;\n\nexport type GetDateOfBirthFn = () => Promise<Date>;\nexport type GetBiologicalSexFn = () => Promise<HKBiologicalSex>;\nexport type GetWheelchairUseFn = () => Promise<HKWheelchairUse>;\nexport type GetFitzpatrickSkinTypeFn = () => Promise<HKFitzpatrickSkinType>;\n\nexport type QueryStatisticsForQuantityFn = <TUnit extends HKUnit>(\n identifier: HKQuantityTypeIdentifier,\n options: readonly HKStatisticsOptions[],\n from: Date,\n to?: Date,\n unit?: TUnit\n) => Promise<QueryStatisticsResponse<TUnit>>;\n\nexport type QueryWorkoutsFn = <\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n>(\n options: QueryWorkoutsOptions<TEnergy, TDistance>\n) => Promise<readonly HKWorkout<TEnergy, TDistance>[]>;\n\nexport type AuthorizationStatusForFn = (\n type: HealthkitReadAuthorization\n) => Promise<boolean>;\n\nexport type QueryCategorySamplesFn = <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n options: GenericQueryOptions\n) => Promise<readonly HKCategorySample<T>[]>;\n\nexport type GetRequestStatusForAuthorizationFn = (\n read: readonly HealthkitReadAuthorization[],\n write?: readonly HealthkitWriteAuthorization[]\n) => Promise<HKAuthorizationRequestStatus>;\n\nexport type RequestAuthorizationFn = (\n read: readonly HealthkitReadAuthorization[],\n write?: readonly HealthkitWriteAuthorization[]\n) => Promise<boolean>;\n\nexport type SaveQuantitySampleFn = <TUnit extends HKQuantityTypeIdentifier>(\n identifier: TUnit,\n unit: HKUnit,\n value: number,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForQuantityIdentifier<TUnit>;\n }\n) => Promise<boolean>;\n\nexport type QueryQuantitySamplesFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends HKUnit = HKUnit\n>(\n identifier: TIdentifier,\n options: GenericQueryOptions & { readonly unit?: TUnit }\n) => Promise<readonly HKQuantitySample<TIdentifier, TUnit>[]>;\n\nexport type SubscribeToChangesFn = (\n identifier: SampleTypeIdentifier,\n callback: () => void\n) => Promise<UnsubscribeFunction>;\n\nexport type SaveCategorySampleFn = <T extends HKCategoryTypeIdentifier>(\n identifier: T,\n value: HKCategoryValueForIdentifier<T>,\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCategoryIdentifier<T>;\n }\n) => Promise<boolean>;\n\nexport type GetMostRecentCategorySampleFn = <\n T extends HKCategoryTypeIdentifier\n>(\n identifier: T\n) => Promise<HKCategorySample<T> | null>;\n\nexport type MostRecentCategorySampleHook = <T extends HKCategoryTypeIdentifier>(\n identifier: T\n) => HKCategorySample<T> | null;\n\nexport type MostRecentCorrelationSampleHook = <\n T extends HKCorrelationTypeIdentifier\n>(\n identifer: T\n) => HKCorrelation<T> | null;\n\nexport type GetMostRecentQuantitySampleFn = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends HKUnit\n>(\n identifier: TIdentifier,\n unit?: TUnit\n) => Promise<HKQuantitySample<TIdentifier, TUnit> | null>;\n\nexport type MostRecentQuantitySampleHook = <\n TIdentifier extends HKQuantityTypeIdentifier,\n TUnit extends HKUnit\n>(\n identifier: TIdentifier,\n unit?: TUnit\n) => HKQuantitySample<TIdentifier, TUnit> | null;\n\nexport type GetMostRecentWorkoutFn = <\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n>(\n options?: Pick<\n QueryWorkoutsOptions<TEnergy, TDistance>,\n 'distanceUnit' | 'energyUnit'\n >\n) => Promise<HKWorkout<TEnergy, TDistance> | null>;\n\nexport type MostRecentWorkoutHook = <\n TEnergy extends HKUnit,\n TDistance extends HKUnit\n>(\n options?: Pick<\n QueryWorkoutsOptions<TEnergy, TDistance>,\n 'distanceUnit' | 'energyUnit'\n >\n) => HKWorkout<TEnergy, TDistance> | null;\n\nexport type GetPreferredUnitsFn = (\n identifiers: readonly HKQuantityTypeIdentifier[]\n) => Promise<readonly HKUnit[]>;\n\nexport type GetPreferredUnitFn = (\n identifier: HKQuantityTypeIdentifier\n) => Promise<HKUnit>;\n\nexport type SaveCorrelationSampleFn = <\n TIdentifier extends HKCorrelationTypeIdentifier\n>(\n typeIdentifier: TIdentifier,\n samples: readonly (\n | Omit<HKCategorySample, 'device' | 'endDate' | 'startDate' | 'uuid'>\n | Omit<HKQuantitySample, 'device' | 'endDate' | 'startDate' | 'uuid'>\n )[],\n options?: {\n readonly start?: Date;\n readonly end?: Date;\n readonly metadata?: MetadataMapperForCorrelationIdentifier<TIdentifier>;\n }\n) => Promise<boolean>;\n\nexport type SaveWorkoutSampleFn = (\n typeIdentifier: HKWorkoutActivityType,\n quantities: readonly Omit<\n HKQuantitySample,\n 'device' | 'endDate' | 'startDate' | 'uuid'\n >[],\n start: Date,\n options?: {\n readonly end?: Date;\n readonly metadata?: HKWorkoutMetadata;\n }\n) => Promise<boolean>;\n\nexport interface HKCorrelation<TIdentifier extends HKCorrelationTypeIdentifier>\n extends Omit<\n HKCorrelationRaw<TIdentifier>,\n 'endDate' | 'objects' | 'startDate'\n > {\n readonly objects: readonly (HKCategorySample | HKQuantitySample)[];\n readonly startDate: Date;\n readonly endDate: Date;\n}\n\nexport type QueryCorrelationSamplesFn = <\n TIdentifier extends HKCorrelationTypeIdentifier\n>(\n typeIdentifier: TIdentifier,\n options: Omit<GenericQueryOptions, 'ascending' | 'limit'>\n) => Promise<readonly HKCorrelation<TIdentifier>[]>;\n\nexport type SubscribeToChangesHook = <\n TIdentifier extends SampleTypeIdentifier\n>(\n identifier: TIdentifier,\n onChange: () => void,\n runInitialUpdate?: boolean\n) => void;\n\nexport type GetWorkoutRoutesFn = (\n workoutUUID: string\n) => Promise<readonly WorkoutRoute[]>;\n\nexport type ReactNativeHealthkit = {\n readonly authorizationStatusFor: AuthorizationStatusForFn;\n\n readonly getBiologicalSex: GetBiologicalSexFn;\n readonly getBloodType: GetBloodTypeFn;\n readonly getDateOfBirth: GetDateOfBirthFn;\n readonly getFitzpatrickSkinType: GetFitzpatrickSkinTypeFn;\n readonly getMostRecentQuantitySample: GetMostRecentQuantitySampleFn;\n readonly getMostRecentCategorySample: GetMostRecentCategorySampleFn;\n readonly getMostRecentWorkout: GetMostRecentWorkoutFn;\n readonly getPreferredUnit: GetPreferredUnitFn;\n readonly getPreferredUnits: GetPreferredUnitsFn;\n readonly getRequestStatusForAuthorization: GetRequestStatusForAuthorizationFn;\n readonly getWheelchairUse: GetWheelchairUseFn;\n readonly getWorkoutRoutes: GetWorkoutRoutesFn;\n\n readonly buildUnitWithPrefix: (prefix: HKUnitSIPrefix, unit: HKUnitSI) => HKUnit;\n\n readonly isHealthDataAvailable: IsHealthDataAvailableFn;\n\n readonly queryCategorySamples: QueryCategorySamplesFn;\n readonly queryQuantitySamples: QueryQuantitySamplesFn;\n readonly queryStatisticsForQuantity: QueryStatisticsForQuantityFn;\n readonly queryWorkouts: QueryWorkoutsFn;\n readonly queryCorrelationSamples: QueryCorrelationSamplesFn;\n\n readonly requestAuthorization: RequestAuthorizationFn;\n\n readonly saveCategorySample: SaveCategorySampleFn;\n readonly saveQuantitySample: SaveQuantitySampleFn;\n readonly saveCorrelationSample: SaveCorrelationSampleFn;\n readonly saveWorkoutSample: SaveWorkoutSampleFn;\n readonly enableBackgroundDelivery: (\n typeIdentifier: SampleTypeIdentifier,\n updateFrequency: HKUpdateFrequency\n ) => Promise<boolean>;\n readonly disableBackgroundDelivery: (\n typeIdentifier: SampleTypeIdentifier\n ) => Promise<boolean>;\n readonly disableAllBackgroundDelivery: () => Promise<boolean>;\n\n readonly subscribeToChanges: SubscribeToChangesFn;\n\n readonly useMostRecentWorkout: MostRecentWorkoutHook;\n readonly useMostRecentCategorySample: MostRecentCategorySampleHook;\n readonly useMostRecentQuantitySample: MostRecentQuantitySampleHook;\n\n readonly useSubscribeToChanges: SubscribeToChangesHook;\n readonly useIsHealthDataAvailable: () => boolean | null;\n readonly useHealthkitAuthorization: (\n read: readonly HealthkitReadAuthorization[],\n write?: readonly HealthkitWriteAuthorization[],\n ) => readonly [authorizationStatus: HKAuthorizationRequestStatus | null, request: () => Promise<HKAuthorizationRequestStatus | null>];\n};\n"],"mappings":""}