@kingstinct/react-native-healthkit 4.4.4 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/ios/ReactNativeHealthkit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/ReactNativeHealthkit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/ReactNativeHealthkit.xcodeproj/project.xcworkspace/xcuserdata/robertherber.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/ReactNativeHealthkit.xcodeproj/xcuserdata/robertherber.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/lib/commonjs/hooks/useHealthkitAuthorization.js +41 -0
- package/lib/commonjs/hooks/useHealthkitAuthorization.js.map +1 -0
- package/lib/commonjs/hooks/useIsHealthDataAvailable.js +29 -0
- package/lib/commonjs/hooks/useIsHealthDataAvailable.js.map +1 -0
- package/lib/commonjs/hooks/useMostRecentCategorySample.js +27 -0
- package/lib/commonjs/hooks/useMostRecentCategorySample.js.map +1 -0
- package/lib/commonjs/hooks/useMostRecentQuantitySample.js +43 -0
- package/lib/commonjs/hooks/useMostRecentQuantitySample.js.map +1 -0
- package/lib/commonjs/hooks/useMostRecentWorkout.js +60 -0
- package/lib/commonjs/hooks/useMostRecentWorkout.js.map +1 -0
- package/lib/commonjs/hooks/useStatisticsForQuantity.js +35 -0
- package/lib/commonjs/hooks/useStatisticsForQuantity.js.map +1 -0
- package/lib/commonjs/hooks/useSubscribeToChanges.js +37 -0
- package/lib/commonjs/hooks/useSubscribeToChanges.js.map +1 -0
- package/lib/commonjs/index.ios.js +66 -394
- package/lib/commonjs/index.ios.js.map +1 -1
- package/lib/commonjs/index.js +9 -17
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native-types.js +249 -78
- package/lib/commonjs/native-types.js.map +1 -1
- package/lib/commonjs/types.js +13 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/deserializeCategorySample.js +15 -0
- package/lib/commonjs/utils/deserializeCategorySample.js.map +1 -0
- package/lib/commonjs/utils/deserializeCorrelation.js +32 -0
- package/lib/commonjs/utils/deserializeCorrelation.js.map +1 -0
- package/lib/commonjs/utils/deserializeSample.js +17 -0
- package/lib/commonjs/utils/deserializeSample.js.map +1 -0
- package/lib/commonjs/utils/deserializeWorkout.js +17 -0
- package/lib/commonjs/utils/deserializeWorkout.js.map +1 -0
- package/lib/commonjs/utils/ensureMetadata.js +14 -0
- package/lib/commonjs/utils/ensureMetadata.js.map +1 -0
- package/lib/commonjs/utils/ensureUnit.js +23 -0
- package/lib/commonjs/utils/ensureUnit.js.map +1 -0
- package/lib/commonjs/utils/getDateOfBirth.js +19 -0
- package/lib/commonjs/utils/getDateOfBirth.js.map +1 -0
- package/lib/commonjs/utils/getMostRecentCategorySample.js +22 -0
- package/lib/commonjs/utils/getMostRecentCategorySample.js.map +1 -0
- package/lib/commonjs/utils/getMostRecentQuantitySample.js +22 -0
- package/lib/commonjs/utils/getMostRecentQuantitySample.js.map +1 -0
- package/lib/commonjs/utils/getMostRecentWorkout.js +24 -0
- package/lib/commonjs/utils/getMostRecentWorkout.js.map +1 -0
- package/lib/commonjs/utils/getPreferredUnit.js +19 -0
- package/lib/commonjs/utils/getPreferredUnit.js.map +1 -0
- package/lib/commonjs/utils/getPreferredUnits.js +19 -0
- package/lib/commonjs/utils/getPreferredUnits.js.map +1 -0
- package/lib/commonjs/utils/getPreferredUnitsTyped.js +46 -0
- package/lib/commonjs/utils/getPreferredUnitsTyped.js.map +1 -0
- package/lib/commonjs/utils/getRequestStatusForAuthorization.js +25 -0
- package/lib/commonjs/utils/getRequestStatusForAuthorization.js.map +1 -0
- package/lib/commonjs/utils/prepareOptions.js +27 -0
- package/lib/commonjs/utils/prepareOptions.js.map +1 -0
- package/lib/commonjs/utils/queryCategorySamples.js +24 -0
- package/lib/commonjs/utils/queryCategorySamples.js.map +1 -0
- package/lib/commonjs/utils/queryCorrelationSamples.js +24 -0
- package/lib/commonjs/utils/queryCorrelationSamples.js.map +1 -0
- package/lib/commonjs/utils/queryQuantitySamples.js +27 -0
- package/lib/commonjs/utils/queryQuantitySamples.js.map +1 -0
- package/lib/commonjs/utils/queryStatisticsForQuantity.js +34 -0
- package/lib/commonjs/utils/queryStatisticsForQuantity.js.map +1 -0
- package/lib/commonjs/utils/queryWorkouts.js +30 -0
- package/lib/commonjs/utils/queryWorkouts.js.map +1 -0
- package/lib/commonjs/utils/requestAuthorization.js +25 -0
- package/lib/commonjs/utils/requestAuthorization.js.map +1 -0
- package/lib/commonjs/utils/saveCategorySample.js +21 -0
- package/lib/commonjs/utils/saveCategorySample.js.map +1 -0
- package/lib/commonjs/utils/saveCorrelationSample.js +24 -0
- package/lib/commonjs/utils/saveCorrelationSample.js.map +1 -0
- package/lib/commonjs/utils/saveQuantitySample.js +21 -0
- package/lib/commonjs/utils/saveQuantitySample.js.map +1 -0
- package/lib/commonjs/utils/saveWorkoutSample.js +25 -0
- package/lib/commonjs/utils/saveWorkoutSample.js.map +1 -0
- package/lib/commonjs/utils/serializeDate.js +12 -0
- package/lib/commonjs/utils/serializeDate.js.map +1 -0
- package/lib/commonjs/utils/subscribeToChanges.js +37 -0
- package/lib/commonjs/utils/subscribeToChanges.js.map +1 -0
- package/lib/module/hooks/useHealthkitAuthorization.js +29 -0
- package/lib/module/hooks/useHealthkitAuthorization.js.map +1 -0
- package/lib/module/hooks/useIsHealthDataAvailable.js +18 -0
- package/lib/module/hooks/useIsHealthDataAvailable.js.map +1 -0
- package/lib/module/hooks/useMostRecentCategorySample.js +15 -0
- package/lib/module/hooks/useMostRecentCategorySample.js.map +1 -0
- package/lib/module/hooks/useMostRecentQuantitySample.js +30 -0
- package/lib/module/hooks/useMostRecentQuantitySample.js.map +1 -0
- package/lib/module/hooks/useMostRecentWorkout.js +47 -0
- package/lib/module/hooks/useMostRecentWorkout.js.map +1 -0
- package/lib/module/hooks/useStatisticsForQuantity.js +23 -0
- package/lib/module/hooks/useStatisticsForQuantity.js.map +1 -0
- package/lib/module/hooks/useSubscribeToChanges.js +26 -0
- package/lib/module/hooks/useSubscribeToChanges.js.map +1 -0
- package/lib/module/index.ios.js +32 -370
- package/lib/module/index.ios.js.map +1 -1
- package/lib/module/index.js +10 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/native-types.js +232 -74
- package/lib/module/native-types.js.map +1 -1
- package/lib/module/types.js +15 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/deserializeCategorySample.js +7 -0
- package/lib/module/utils/deserializeCategorySample.js.map +1 -0
- package/lib/module/utils/deserializeCorrelation.js +21 -0
- package/lib/module/utils/deserializeCorrelation.js.map +1 -0
- package/lib/module/utils/deserializeSample.js +9 -0
- package/lib/module/utils/deserializeSample.js.map +1 -0
- package/lib/module/utils/deserializeWorkout.js +9 -0
- package/lib/module/utils/deserializeWorkout.js.map +1 -0
- package/lib/module/utils/ensureMetadata.js +6 -0
- package/lib/module/utils/ensureMetadata.js.map +1 -0
- package/lib/module/utils/ensureUnit.js +13 -0
- package/lib/module/utils/ensureUnit.js.map +1 -0
- package/lib/module/utils/getDateOfBirth.js +9 -0
- package/lib/module/utils/getDateOfBirth.js.map +1 -0
- package/lib/module/utils/getMostRecentCategorySample.js +12 -0
- package/lib/module/utils/getMostRecentCategorySample.js.map +1 -0
- package/lib/module/utils/getMostRecentQuantitySample.js +12 -0
- package/lib/module/utils/getMostRecentQuantitySample.js.map +1 -0
- package/lib/module/utils/getMostRecentWorkout.js +14 -0
- package/lib/module/utils/getMostRecentWorkout.js.map +1 -0
- package/lib/module/utils/getPreferredUnit.js +9 -0
- package/lib/module/utils/getPreferredUnit.js.map +1 -0
- package/lib/module/utils/getPreferredUnits.js +9 -0
- package/lib/module/utils/getPreferredUnits.js.map +1 -0
- package/lib/module/utils/getPreferredUnitsTyped.js +34 -0
- package/lib/module/utils/getPreferredUnitsTyped.js.map +1 -0
- package/lib/module/utils/getRequestStatusForAuthorization.js +15 -0
- package/lib/module/utils/getRequestStatusForAuthorization.js.map +1 -0
- package/lib/module/utils/prepareOptions.js +17 -0
- package/lib/module/utils/prepareOptions.js.map +1 -0
- package/lib/module/utils/queryCategorySamples.js +12 -0
- package/lib/module/utils/queryCategorySamples.js.map +1 -0
- package/lib/module/utils/queryCorrelationSamples.js +12 -0
- package/lib/module/utils/queryCorrelationSamples.js.map +1 -0
- package/lib/module/utils/queryQuantitySamples.js +14 -0
- package/lib/module/utils/queryQuantitySamples.js.map +1 -0
- package/lib/module/utils/queryStatisticsForQuantity.js +23 -0
- package/lib/module/utils/queryStatisticsForQuantity.js.map +1 -0
- package/lib/module/utils/queryWorkouts.js +17 -0
- package/lib/module/utils/queryWorkouts.js.map +1 -0
- package/lib/module/utils/requestAuthorization.js +15 -0
- package/lib/module/utils/requestAuthorization.js.map +1 -0
- package/lib/module/utils/saveCategorySample.js +11 -0
- package/lib/module/utils/saveCategorySample.js.map +1 -0
- package/lib/module/utils/saveCorrelationSample.js +13 -0
- package/lib/module/utils/saveCorrelationSample.js.map +1 -0
- package/lib/module/utils/saveQuantitySample.js +11 -0
- package/lib/module/utils/saveQuantitySample.js.map +1 -0
- package/lib/module/utils/saveWorkoutSample.js +14 -0
- package/lib/module/utils/saveWorkoutSample.js.map +1 -0
- package/lib/module/utils/serializeDate.js +4 -0
- package/lib/module/utils/serializeDate.js.map +1 -0
- package/lib/module/utils/subscribeToChanges.js +25 -0
- package/lib/module/utils/subscribeToChanges.js.map +1 -0
- package/lib/typescript/example-expo/App.d.ts +2 -0
- package/lib/typescript/src/hooks/useHealthkitAuthorization.d.ts +3 -0
- package/lib/typescript/src/hooks/useIsHealthDataAvailable.d.ts +2 -0
- package/lib/typescript/src/hooks/useMostRecentCategorySample.d.ts +4 -0
- package/lib/typescript/src/hooks/useMostRecentQuantitySample.d.ts +4 -0
- package/lib/typescript/src/hooks/useMostRecentWorkout.d.ts +7 -0
- package/lib/typescript/src/hooks/useStatisticsForQuantity.d.ts +4 -0
- package/lib/typescript/src/hooks/useSubscribeToChanges.d.ts +3 -0
- package/lib/typescript/src/index.d.ts +2 -3
- package/lib/typescript/src/index.ios.d.ts +48 -3
- package/lib/typescript/src/native-types.d.ts +235 -70
- package/lib/typescript/src/types.d.ts +14 -90
- package/lib/typescript/src/utils/deserializeCategorySample.d.ts +4 -0
- package/lib/typescript/src/utils/deserializeCorrelation.d.ts +4 -0
- package/lib/typescript/src/utils/deserializeSample.d.ts +4 -0
- package/lib/typescript/src/utils/deserializeWorkout.d.ts +4 -0
- package/lib/typescript/src/utils/ensureMetadata.d.ts +2 -0
- package/lib/typescript/src/utils/ensureUnit.d.ts +3 -0
- package/lib/typescript/src/utils/getDateOfBirth.d.ts +2 -0
- package/lib/typescript/src/utils/getMostRecentCategorySample.d.ts +3 -0
- package/lib/typescript/src/utils/getMostRecentQuantitySample.d.ts +3 -0
- package/lib/typescript/src/utils/getMostRecentWorkout.d.ts +5 -0
- package/lib/typescript/src/utils/getPreferredUnit.d.ts +4 -0
- package/lib/typescript/src/utils/getPreferredUnits.d.ts +4 -0
- package/lib/typescript/src/utils/getPreferredUnitsTyped.d.ts +9 -0
- package/lib/typescript/src/utils/getRequestStatusForAuthorization.d.ts +3 -0
- package/lib/typescript/src/utils/prepareOptions.d.ts +8 -0
- package/lib/typescript/src/utils/queryCategorySamples.d.ts +5 -0
- package/lib/typescript/src/utils/queryCorrelationSamples.d.ts +5 -0
- package/lib/typescript/src/utils/queryQuantitySamples.d.ts +7 -0
- package/lib/typescript/src/utils/queryStatisticsForQuantity.d.ts +14 -0
- package/lib/typescript/src/utils/queryWorkouts.d.ts +4 -0
- package/lib/typescript/src/utils/requestAuthorization.d.ts +3 -0
- package/lib/typescript/src/utils/saveCategorySample.d.ts +7 -0
- package/lib/typescript/src/utils/saveCorrelationSample.d.ts +8 -0
- package/lib/typescript/src/utils/saveQuantitySample.d.ts +7 -0
- package/lib/typescript/src/utils/saveWorkoutSample.d.ts +7 -0
- package/lib/typescript/src/utils/serializeDate.d.ts +2 -0
- package/lib/typescript/src/utils/subscribeToChanges.d.ts +3 -0
- package/package.json +17 -6
- package/src/hooks/useHealthkitAuthorization.ts +39 -0
- package/src/hooks/useIsHealthDataAvailable.ts +17 -0
- package/src/hooks/useMostRecentCategorySample.ts +24 -0
- package/src/hooks/useMostRecentQuantitySample.ts +39 -0
- package/src/hooks/useMostRecentWorkout.ts +60 -0
- package/src/hooks/useStatisticsForQuantity.ts +42 -0
- package/src/hooks/useSubscribeToChanges.ts +31 -0
- package/src/index.ios.tsx +36 -569
- package/src/index.tsx +12 -9
- package/src/native-types.ts +323 -93
- package/src/types.ts +41 -152
- package/src/utils/deserializeCategorySample.ts +12 -0
- package/src/utils/deserializeCorrelation.ts +28 -0
- package/src/utils/deserializeSample.ts +17 -0
- package/src/utils/deserializeWorkout.ts +14 -0
- package/src/utils/ensureMetadata.ts +5 -0
- package/src/utils/ensureUnit.ts +19 -0
- package/src/utils/getDateOfBirth.ts +8 -0
- package/src/utils/getMostRecentCategorySample.ts +18 -0
- package/src/utils/getMostRecentQuantitySample.ts +19 -0
- package/src/utils/getMostRecentWorkout.ts +27 -0
- package/src/utils/getPreferredUnit.ts +14 -0
- package/src/utils/getPreferredUnits.ts +14 -0
- package/src/utils/getPreferredUnitsTyped.ts +38 -0
- package/src/utils/getRequestStatusForAuthorization.ts +21 -0
- package/src/utils/prepareOptions.ts +15 -0
- package/src/utils/queryCategorySamples.ts +29 -0
- package/src/utils/queryCorrelationSamples.ts +29 -0
- package/src/utils/queryQuantitySamples.ts +36 -0
- package/src/utils/queryStatisticsForQuantity.ts +38 -0
- package/src/utils/queryWorkouts.ts +28 -0
- package/src/utils/requestAuthorization.ts +18 -0
- package/src/utils/saveCategorySample.ts +27 -0
- package/src/utils/saveCorrelationSample.ts +34 -0
- package/src/utils/saveQuantitySample.ts +29 -0
- package/src/utils/saveWorkoutSample.ts +28 -0
- package/src/utils/serializeDate.ts +3 -0
- package/src/utils/subscribeToChanges.ts +32 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["notAvailableError","Platform","OS","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","
|
|
1
|
+
{"version":3,"names":["notAvailableError","Platform","OS","hasWarned","UnavailableFn","retVal","console","warn","Healthkit","authorizationStatusFor","Promise","resolve","disableAllBackgroundDelivery","disableBackgroundDelivery","enableBackgroundDelivery","getBiologicalSex","HKBiologicalSex","notSet","getBloodType","HKBloodType","getDateOfBirth","Date","getFitzpatrickSkinType","HKFitzpatrickSkinType","getMostRecentCategorySample","getMostRecentQuantitySample","getMostRecentWorkout","getPreferredUnit","HKUnits","Count","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, HKUnits, HKWheelchairUse,\n} from './native-types'\n\nimport type ReactNativeHealthkit from './index.ios'\n\nconst notAvailableError = `[@kingstinct/react-native-healthkit] Platform \"${\n Platform.OS\n}\" not supported`\n\nlet hasWarned = false\n\nfunction UnavailableFn<T = unknown>(retVal: T) {\n return () => {\n if (!hasWarned) {\n console.warn(notAvailableError)\n hasWarned = true\n }\n return retVal\n }\n}\n\nconst Healthkit: typeof ReactNativeHealthkit = {\n authorizationStatusFor: UnavailableFn(Promise.resolve(false)),\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(HKUnits.Count)),\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(HKAuthorizationRequestStatus.unknown)] as const),\n useIsHealthDataAvailable: () => false,\n}\n\nexport * from './types'\n\nexport default Healthkit\n"],"mappings":"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"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.HKWorkoutTypeIdentifier = exports.HKWorkoutRouteTypeIdentifier = exports.HKWorkoutActivityType = exports.HKWheelchairUse = exports.HKWeatherCondition = exports.HKUpdateFrequency = exports.
|
|
6
|
+
exports.default = exports.UnitOfVolume = exports.UnitOfTime = exports.UnitOfPressure = exports.UnitOfMass = exports.UnitOfLength = exports.UnitOfEnergy = exports.TemperatureUnit = exports.HKWorkoutTypeIdentifier = exports.HKWorkoutRouteTypeIdentifier = exports.HKWorkoutActivityType = exports.HKWheelchairUse = exports.HKWeatherCondition = exports.HKUpdateFrequency = exports.HKUnits = exports.HKUnitMetric = exports.HKStatisticsOptions = exports.HKQuantityTypeIdentifier = exports.HKMetricPrefix = 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.HKCategoryValueLowCardioFitnessEvent = exports.HKCategoryValueCervicalMucusQuality = exports.HKCategoryValueAppleStandHour = exports.HKCategoryValueAppetiteChanges = exports.HKCategoryTypeIdentifier = exports.HKBloodType = exports.HKBiologicalSex = exports.HKAuthorizationStatus = exports.HKAuthorizationRequestStatus = exports.HKAudiogramTypeIdentifier = exports.EventEmitter = exports.BloodGlucoseUnit = void 0;
|
|
7
7
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
|
|
@@ -110,8 +110,18 @@ exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier;
|
|
|
110
110
|
HKQuantityTypeIdentifier["stairAscentSpeed"] = "HKQuantityTypeIdentifierStairAscentSpeed";
|
|
111
111
|
HKQuantityTypeIdentifier["stairDescentSpeed"] = "HKQuantityTypeIdentifierStairDescentSpeed";
|
|
112
112
|
HKQuantityTypeIdentifier["uvExposure"] = "HKQuantityTypeIdentifierUvExposure";
|
|
113
|
+
HKQuantityTypeIdentifier["appleMoveTime"] = "HKQuantityTypeIdentifierAppleMoveTime";
|
|
114
|
+
HKQuantityTypeIdentifier["appleWalkingSteadiness"] = "HKQuantityTypeIdentifierAppleWalkingSteadiness";
|
|
115
|
+
HKQuantityTypeIdentifier["numberOfAlcoholicBeverages"] = "HKQuantityTypeIdentifierNumberOfAlcoholicBeverages";
|
|
113
116
|
})(HKQuantityTypeIdentifier || (exports.HKQuantityTypeIdentifier = HKQuantityTypeIdentifier = {}));
|
|
114
117
|
|
|
118
|
+
let HKCategoryValueLowCardioFitnessEvent;
|
|
119
|
+
exports.HKCategoryValueLowCardioFitnessEvent = HKCategoryValueLowCardioFitnessEvent;
|
|
120
|
+
|
|
121
|
+
(function (HKCategoryValueLowCardioFitnessEvent) {
|
|
122
|
+
HKCategoryValueLowCardioFitnessEvent[HKCategoryValueLowCardioFitnessEvent["lowFitness"] = 1] = "lowFitness";
|
|
123
|
+
})(HKCategoryValueLowCardioFitnessEvent || (exports.HKCategoryValueLowCardioFitnessEvent = HKCategoryValueLowCardioFitnessEvent = {}));
|
|
124
|
+
|
|
115
125
|
let HKHeartRateMotionContext;
|
|
116
126
|
exports.HKHeartRateMotionContext = HKHeartRateMotionContext;
|
|
117
127
|
|
|
@@ -146,6 +156,55 @@ exports.HKCategoryTypeIdentifier = HKCategoryTypeIdentifier;
|
|
|
146
156
|
HKCategoryTypeIdentifier["irregularHeartRhythmEvent"] = "HKCategoryTypeIdentifierIrregularHeartRhythmEvent";
|
|
147
157
|
HKCategoryTypeIdentifier["audioExposureEvent"] = "HKCategoryTypeIdentifierAudioExposureEvent";
|
|
148
158
|
HKCategoryTypeIdentifier["toothbrushingEvent"] = "HKCategoryTypeIdentifierToothbrushingEvent";
|
|
159
|
+
HKCategoryTypeIdentifier["lowCardioFitnessEvent"] = "HKCategoryTypeIdentifierLowCardioFitnessEvent";
|
|
160
|
+
HKCategoryTypeIdentifier["contraceptive"] = "HKCategoryTypeIdentifierContraceptive";
|
|
161
|
+
HKCategoryTypeIdentifier["lactation"] = "HKCategoryTypeIdentifierLactation";
|
|
162
|
+
HKCategoryTypeIdentifier["pregnancy"] = "HKCategoryTypeIdentifierPregnancy";
|
|
163
|
+
HKCategoryTypeIdentifier["pregnancyTestResult"] = "HKCategoryTypeIdentifierPregnancyTestResult";
|
|
164
|
+
HKCategoryTypeIdentifier["progesteroneTestResult"] = "HKCategoryTypeIdentifierProgesteroneTestResult";
|
|
165
|
+
HKCategoryTypeIdentifier["environmentalAudioExposureEvent"] = "HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent";
|
|
166
|
+
HKCategoryTypeIdentifier["headphoneAudioExposureEvent"] = "HKCategoryTypeIdentifierHeadphoneAudioExposureEvent";
|
|
167
|
+
HKCategoryTypeIdentifier["appleWalkingSteadinessEvent"] = "HKCategoryTypeIdentifierAppleWalkingSteadinessEvent";
|
|
168
|
+
HKCategoryTypeIdentifier["handwashingEvent"] = "HKCategoryTypeIdentifierHandwashingEvent";
|
|
169
|
+
HKCategoryTypeIdentifier["abdominalCramps"] = "HKCategoryTypeIdentifierAbdominalCramps";
|
|
170
|
+
HKCategoryTypeIdentifier["acne"] = "HKCategoryTypeIdentifierAcne";
|
|
171
|
+
HKCategoryTypeIdentifier["appetiteChanges"] = "HKCategoryTypeIdentifierAppetiteChanges";
|
|
172
|
+
HKCategoryTypeIdentifier["bladderIncontinence"] = "HKCategoryTypeIdentifierBladderIncontinence";
|
|
173
|
+
HKCategoryTypeIdentifier["bloating"] = "HKCategoryTypeIdentifierBloating";
|
|
174
|
+
HKCategoryTypeIdentifier["breastPain"] = "HKCategoryTypeIdentifierBreastPain";
|
|
175
|
+
HKCategoryTypeIdentifier["chestTightnessOrPain"] = "HKCategoryTypeIdentifierChestTightnessOrPain";
|
|
176
|
+
HKCategoryTypeIdentifier["chills"] = "HKCategoryTypeIdentifierChills";
|
|
177
|
+
HKCategoryTypeIdentifier["constipation"] = "HKCategoryTypeIdentifierConstipation";
|
|
178
|
+
HKCategoryTypeIdentifier["coughing"] = "HKCategoryTypeIdentifierCoughing";
|
|
179
|
+
HKCategoryTypeIdentifier["diarrhea"] = "HKCategoryTypeIdentifierDiarrhea";
|
|
180
|
+
HKCategoryTypeIdentifier["dizziness"] = "HKCategoryTypeIdentifierDizziness";
|
|
181
|
+
HKCategoryTypeIdentifier["drySkin"] = "HKCategoryTypeIdentifierDrySkin";
|
|
182
|
+
HKCategoryTypeIdentifier["fainting"] = "HKCategoryTypeIdentifierFainting";
|
|
183
|
+
HKCategoryTypeIdentifier["fatigue"] = "HKCategoryTypeIdentifierFatigue";
|
|
184
|
+
HKCategoryTypeIdentifier["fever"] = "HKCategoryTypeIdentifierFever";
|
|
185
|
+
HKCategoryTypeIdentifier["generalizedBodyAche"] = "HKCategoryTypeIdentifierGeneralizedBodyAche";
|
|
186
|
+
HKCategoryTypeIdentifier["hairLoss"] = "HKCategoryTypeIdentifierHairLoss";
|
|
187
|
+
HKCategoryTypeIdentifier["headache"] = "HKCategoryTypeIdentifierHeadache";
|
|
188
|
+
HKCategoryTypeIdentifier["heartburn"] = "HKCategoryTypeIdentifierHeartburn";
|
|
189
|
+
HKCategoryTypeIdentifier["hotFlashes"] = "HKCategoryTypeIdentifierHotFlashes";
|
|
190
|
+
HKCategoryTypeIdentifier["lossOfSmell"] = "HKCategoryTypeIdentifierLossOfSmell";
|
|
191
|
+
HKCategoryTypeIdentifier["lossOfTaste"] = "HKCategoryTypeIdentifierLossOfTaste";
|
|
192
|
+
HKCategoryTypeIdentifier["lowerBackPain"] = "HKCategoryTypeIdentifierLowerBackPain";
|
|
193
|
+
HKCategoryTypeIdentifier["memoryLapse"] = "HKCategoryTypeIdentifierMemoryLapse";
|
|
194
|
+
HKCategoryTypeIdentifier["moodChanges"] = "HKCategoryTypeIdentifierMoodChanges";
|
|
195
|
+
HKCategoryTypeIdentifier["nausea"] = "HKCategoryTypeIdentifierNausea";
|
|
196
|
+
HKCategoryTypeIdentifier["nightSweats"] = "HKCategoryTypeIdentifierNightSweats";
|
|
197
|
+
HKCategoryTypeIdentifier["pelvicPain"] = "HKCategoryTypeIdentifierPelvicPain";
|
|
198
|
+
HKCategoryTypeIdentifier["rapidPoundingOrFlutteringHeartbeat"] = "HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat";
|
|
199
|
+
HKCategoryTypeIdentifier["runnyNose"] = "HKCategoryTypeIdentifierRunnyNose";
|
|
200
|
+
HKCategoryTypeIdentifier["shortnessOfBreath"] = "HKCategoryTypeIdentifierShortnessOfBreath";
|
|
201
|
+
HKCategoryTypeIdentifier["sinusCongestion"] = "HKCategoryTypeIdentifierSinusCongestion";
|
|
202
|
+
HKCategoryTypeIdentifier["skippedHeartbeat"] = "HKCategoryTypeIdentifierSkippedHeartbeat";
|
|
203
|
+
HKCategoryTypeIdentifier["sleepChanges"] = "HKCategoryTypeIdentifierSleepChanges";
|
|
204
|
+
HKCategoryTypeIdentifier["soreThroat"] = "HKCategoryTypeIdentifierSoreThroat";
|
|
205
|
+
HKCategoryTypeIdentifier["vaginalDryness"] = "HKCategoryTypeIdentifierVaginalDryness";
|
|
206
|
+
HKCategoryTypeIdentifier["vomiting"] = "HKCategoryTypeIdentifierVomiting";
|
|
207
|
+
HKCategoryTypeIdentifier["wheezing"] = "HKCategoryTypeIdentifierWheezing";
|
|
149
208
|
})(HKCategoryTypeIdentifier || (exports.HKCategoryTypeIdentifier = HKCategoryTypeIdentifier = {}));
|
|
150
209
|
|
|
151
210
|
let HKCategoryValueAppleStandHour;
|
|
@@ -436,6 +495,25 @@ exports.HKInsulinDeliveryReason = HKInsulinDeliveryReason;
|
|
|
436
495
|
HKInsulinDeliveryReason[HKInsulinDeliveryReason["bolus"] = 2] = "bolus";
|
|
437
496
|
})(HKInsulinDeliveryReason || (exports.HKInsulinDeliveryReason = HKInsulinDeliveryReason = {}));
|
|
438
497
|
|
|
498
|
+
var HKCategoryValuePregnancyTestResult;
|
|
499
|
+
/* needs further mapping
|
|
500
|
+
|
|
501
|
+
contraceptive = 'HKCategoryTypeIdentifierContraceptive',
|
|
502
|
+
lactation = 'HKCategoryTypeIdentifierLactation',
|
|
503
|
+
pregnancy = 'HKCategoryTypeIdentifierPregnancy',
|
|
504
|
+
|
|
505
|
+
progesteroneTestResult = 'HKCategoryTypeIdentifierProgesteroneTestResult',
|
|
506
|
+
environmentalAudioExposureEvent = 'HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent',
|
|
507
|
+
headphoneAudioExposureEvent = 'HKCategoryTypeIdentifierHeadphoneAudioExposureEvent',
|
|
508
|
+
appleWalkingSteadinessEvent = 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent',
|
|
509
|
+
handwashingEvent = 'HKCategoryTypeIdentifierHandwashingEvent', // HKCategoryValue */
|
|
510
|
+
|
|
511
|
+
(function (HKCategoryValuePregnancyTestResult) {
|
|
512
|
+
HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["positive"] = 2] = "positive";
|
|
513
|
+
HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["negative"] = 1] = "negative";
|
|
514
|
+
HKCategoryValuePregnancyTestResult[HKCategoryValuePregnancyTestResult["indeterminate"] = 3] = "indeterminate";
|
|
515
|
+
})(HKCategoryValuePregnancyTestResult || (HKCategoryValuePregnancyTestResult = {}));
|
|
516
|
+
|
|
439
517
|
// Maps directly to https://developer.apple.com/documentation/healthkit/hkwheelchairuse
|
|
440
518
|
let HKWheelchairUse; // Unit types are a straight mapping from here https://developer.apple.com/documentation/healthkit/hkunit/1615733-init
|
|
441
519
|
|
|
@@ -447,83 +525,175 @@ exports.HKWheelchairUse = HKWheelchairUse;
|
|
|
447
525
|
HKWheelchairUse[HKWheelchairUse["yes"] = 2] = "yes";
|
|
448
526
|
})(HKWheelchairUse || (exports.HKWheelchairUse = HKWheelchairUse = {}));
|
|
449
527
|
|
|
450
|
-
let
|
|
451
|
-
exports.
|
|
452
|
-
|
|
453
|
-
(function (
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
528
|
+
let HKMetricPrefix;
|
|
529
|
+
exports.HKMetricPrefix = HKMetricPrefix;
|
|
530
|
+
|
|
531
|
+
(function (HKMetricPrefix) {
|
|
532
|
+
HKMetricPrefix["None"] = "";
|
|
533
|
+
HKMetricPrefix["Pico"] = "p";
|
|
534
|
+
HKMetricPrefix["Nano"] = "n";
|
|
535
|
+
HKMetricPrefix["Micro"] = "mc";
|
|
536
|
+
HKMetricPrefix["Milli"] = "m";
|
|
537
|
+
HKMetricPrefix["Centi"] = "c";
|
|
538
|
+
HKMetricPrefix["Deci"] = "d";
|
|
539
|
+
HKMetricPrefix["Deca"] = "da";
|
|
540
|
+
HKMetricPrefix["Hecto"] = "h";
|
|
541
|
+
HKMetricPrefix["Kilo"] = "k";
|
|
542
|
+
HKMetricPrefix["Mega"] = "M";
|
|
543
|
+
HKMetricPrefix["Giga"] = "G";
|
|
544
|
+
HKMetricPrefix["Tera"] = "T";
|
|
545
|
+
HKMetricPrefix["Femto"] = "f";
|
|
546
|
+
})(HKMetricPrefix || (exports.HKMetricPrefix = HKMetricPrefix = {}));
|
|
547
|
+
|
|
548
|
+
let HKUnitMetric;
|
|
549
|
+
exports.HKUnitMetric = HKUnitMetric;
|
|
550
|
+
|
|
551
|
+
(function (HKUnitMetric) {
|
|
552
|
+
HKUnitMetric["Gram"] = "g";
|
|
553
|
+
HKUnitMetric["Joule"] = "J";
|
|
554
|
+
HKUnitMetric["Kelvin"] = "K";
|
|
555
|
+
HKUnitMetric["Liter"] = "l";
|
|
556
|
+
HKUnitMetric["Meter"] = "m";
|
|
557
|
+
HKUnitMetric["Pascal"] = "Pa";
|
|
558
|
+
HKUnitMetric["Second"] = "s";
|
|
559
|
+
HKUnitMetric["Siemen"] = "S";
|
|
560
|
+
HKUnitMetric["Hertz"] = "Hz";
|
|
561
|
+
HKUnitMetric["Volt"] = "V";
|
|
562
|
+
})(HKUnitMetric || (exports.HKUnitMetric = HKUnitMetric = {}));
|
|
563
|
+
|
|
564
|
+
let HKUnits;
|
|
565
|
+
exports.HKUnits = HKUnits;
|
|
566
|
+
|
|
567
|
+
(function (HKUnits) {
|
|
568
|
+
HKUnits["DecibelHearingLevel"] = "dBHL";
|
|
569
|
+
HKUnits["DecibelSoundPressureLevel"] = "dBASPL";
|
|
570
|
+
HKUnits["Percent"] = "%";
|
|
571
|
+
HKUnits["Count"] = "count";
|
|
572
|
+
HKUnits["InternationalUnit"] = "IU";
|
|
573
|
+
})(HKUnits || (exports.HKUnits = HKUnits = {}));
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* More SI prefixes also available as literals, just type the string
|
|
577
|
+
* @example 'cm', 'km'
|
|
578
|
+
*/
|
|
579
|
+
let UnitOfLength;
|
|
580
|
+
exports.UnitOfLength = UnitOfLength;
|
|
581
|
+
|
|
582
|
+
(function (UnitOfLength) {
|
|
583
|
+
UnitOfLength["Feet"] = "ft";
|
|
584
|
+
UnitOfLength["Meter"] = "m";
|
|
585
|
+
UnitOfLength["Inches"] = "in";
|
|
586
|
+
UnitOfLength["Yards"] = "yd";
|
|
587
|
+
UnitOfLength["Miles"] = "mi";
|
|
588
|
+
})(UnitOfLength || (exports.UnitOfLength = UnitOfLength = {}));
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* More SI prefixes also available as literals, just type the string
|
|
592
|
+
* @example 'ml', 'cl'
|
|
593
|
+
*/
|
|
594
|
+
let UnitOfVolume;
|
|
595
|
+
exports.UnitOfVolume = UnitOfVolume;
|
|
596
|
+
|
|
597
|
+
(function (UnitOfVolume) {
|
|
598
|
+
UnitOfVolume["ImperialCup"] = "cup_imp";
|
|
599
|
+
UnitOfVolume["ImperialFluidOunces"] = "fl_oz_imp";
|
|
600
|
+
UnitOfVolume["ImperialPint"] = "pt_imp";
|
|
601
|
+
UnitOfVolume["USCup"] = "cup_us";
|
|
602
|
+
UnitOfVolume["USFluidOunces"] = "fl_oz_us";
|
|
603
|
+
UnitOfVolume["USPint"] = "pt_us";
|
|
604
|
+
UnitOfVolume["Liter"] = "l";
|
|
605
|
+
})(UnitOfVolume || (exports.UnitOfVolume = UnitOfVolume = {}));
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* More SI prefixes also available as literals, just type the string
|
|
609
|
+
* @example 'mg', 'kg'
|
|
610
|
+
*/
|
|
611
|
+
let UnitOfMass;
|
|
612
|
+
/**
|
|
613
|
+
* More SI prefixes also available as literals, just type the string
|
|
614
|
+
* @example 'mg', 'kg'
|
|
615
|
+
*/
|
|
616
|
+
|
|
617
|
+
exports.UnitOfMass = UnitOfMass;
|
|
618
|
+
|
|
619
|
+
(function (UnitOfMass) {
|
|
620
|
+
UnitOfMass["Ounces"] = "oz";
|
|
621
|
+
UnitOfMass["Stones"] = "st";
|
|
622
|
+
UnitOfMass["Pounds"] = "lb";
|
|
623
|
+
UnitOfMass["Gram"] = "g";
|
|
624
|
+
})(UnitOfMass || (exports.UnitOfMass = UnitOfMass = {}));
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* More SI prefixes also available as literals, just type the string
|
|
628
|
+
* @example 'kPa', 'hPa'
|
|
629
|
+
*/
|
|
630
|
+
let UnitOfPressure;
|
|
631
|
+
/**
|
|
632
|
+
* More SI prefixes also available as literals, just type the string
|
|
633
|
+
* @example 'kPa', 'hPa'
|
|
634
|
+
*/
|
|
635
|
+
|
|
636
|
+
exports.UnitOfPressure = UnitOfPressure;
|
|
637
|
+
|
|
638
|
+
(function (UnitOfPressure) {
|
|
639
|
+
UnitOfPressure["Atmospheres"] = "atm";
|
|
640
|
+
UnitOfPressure["CentimetersOfWater"] = "cmAq";
|
|
641
|
+
UnitOfPressure["MillimetersOfMercury"] = "mmHg";
|
|
642
|
+
UnitOfPressure["InchesOfMercury"] = "inHg";
|
|
643
|
+
UnitOfPressure["DecibelAWeightedSoundPressureLevel"] = "dBASPL";
|
|
644
|
+
UnitOfPressure["Pascals"] = "Pa";
|
|
645
|
+
})(UnitOfPressure || (exports.UnitOfPressure = UnitOfPressure = {}));
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* More SI prefixes also available as literals, just type the string
|
|
649
|
+
* @example 'ms'
|
|
650
|
+
*/
|
|
651
|
+
let UnitOfTime;
|
|
652
|
+
/**
|
|
653
|
+
* More SI prefixes also available as literals, just type the string
|
|
654
|
+
* @example 'ms'
|
|
655
|
+
*/
|
|
656
|
+
|
|
657
|
+
exports.UnitOfTime = UnitOfTime;
|
|
658
|
+
|
|
659
|
+
(function (UnitOfTime) {
|
|
660
|
+
UnitOfTime["Days"] = "d";
|
|
661
|
+
UnitOfTime["Minutes"] = "min";
|
|
662
|
+
UnitOfTime["Hours"] = "hr";
|
|
663
|
+
UnitOfTime["Seconds"] = "s";
|
|
664
|
+
})(UnitOfTime || (exports.UnitOfTime = UnitOfTime = {}));
|
|
665
|
+
|
|
666
|
+
let TemperatureUnit;
|
|
667
|
+
/**
|
|
668
|
+
* More SI prefixes also available as literals, just type the string
|
|
669
|
+
* @example 'kJ'
|
|
670
|
+
*/
|
|
671
|
+
|
|
672
|
+
exports.TemperatureUnit = TemperatureUnit;
|
|
673
|
+
|
|
674
|
+
(function (TemperatureUnit) {
|
|
675
|
+
TemperatureUnit["DegreesCelsius"] = "degC";
|
|
676
|
+
TemperatureUnit["DegreesFahrenheit"] = "degF";
|
|
677
|
+
TemperatureUnit["Kelvin"] = "K";
|
|
678
|
+
})(TemperatureUnit || (exports.TemperatureUnit = TemperatureUnit = {}));
|
|
679
|
+
|
|
680
|
+
let UnitOfEnergy;
|
|
681
|
+
exports.UnitOfEnergy = UnitOfEnergy;
|
|
682
|
+
|
|
683
|
+
(function (UnitOfEnergy) {
|
|
684
|
+
UnitOfEnergy["Kilocalories"] = "kcal";
|
|
685
|
+
UnitOfEnergy["LargeCalories"] = "Cal";
|
|
686
|
+
UnitOfEnergy["SmallCalories"] = "cal";
|
|
687
|
+
UnitOfEnergy["Joules"] = "J";
|
|
688
|
+
})(UnitOfEnergy || (exports.UnitOfEnergy = UnitOfEnergy = {}));
|
|
689
|
+
|
|
690
|
+
let BloodGlucoseUnit;
|
|
691
|
+
exports.BloodGlucoseUnit = BloodGlucoseUnit;
|
|
692
|
+
|
|
693
|
+
(function (BloodGlucoseUnit) {
|
|
694
|
+
BloodGlucoseUnit["GlucoseMmolPerL"] = "mmol<180.15588000005408>/l";
|
|
695
|
+
BloodGlucoseUnit["GlucoseMgPerDl"] = "mg/dL";
|
|
696
|
+
})(BloodGlucoseUnit || (exports.BloodGlucoseUnit = BloodGlucoseUnit = {}));
|
|
527
697
|
|
|
528
698
|
// Straight mapping to https://developer.apple.com/documentation/healthkit/hkcharacteristictypeidentifier
|
|
529
699
|
let HKCharacteristicTypeIdentifier;
|
|
@@ -535,6 +705,7 @@ exports.HKCharacteristicTypeIdentifier = HKCharacteristicTypeIdentifier;
|
|
|
535
705
|
HKCharacteristicTypeIdentifier["bloodType"] = "HKCharacteristicTypeIdentifierBloodType";
|
|
536
706
|
HKCharacteristicTypeIdentifier["dateOfBirth"] = "HKCharacteristicTypeIdentifierDateOfBirth";
|
|
537
707
|
HKCharacteristicTypeIdentifier["wheelchairUse"] = "HKCharacteristicTypeIdentifierWheelchairUse";
|
|
708
|
+
HKCharacteristicTypeIdentifier["activityMoveMode"] = "HKCharacteristicTypeIdentifierActivityMoveMode";
|
|
538
709
|
})(HKCharacteristicTypeIdentifier || (exports.HKCharacteristicTypeIdentifier = HKCharacteristicTypeIdentifier = {}));
|
|
539
710
|
|
|
540
711
|
let HKUpdateFrequency;
|